Upgrade to Pro — share decks privately, control downloads, hide ads and more …

型があると嬉しい〜って本当??

 型があると嬉しい〜って本当??

hideki kinjyo

July 31, 2023
Tweet

More Decks by hideki kinjyo

Other Decks in Programming

Transcript

  1. 

  2. :

  3. int / $response->getBody() $body- >eof() string, bool, Response, Stream 

    ࢀߟ 
 IUUQTHJUIVCDPNTMJNQIQ4MJNCMPC4MJN 3FTQPOTF&NJUUFSQIQ
  4. :

  5. ੩తղੳπʔϧΛ࢖͓͏ / PHPStan https://phpstan.org/ PHPStan scans your whole codebase and

    looks for both obvious & tricky bugs. Even in those rarely executed if statements that certainly aren't covered by tests. ( ) 
  6. ੩తղੳπʔϧΛ࢖͓͏ / Psalm https://psalm.dev/ Psalm is a static analysis tool

    that attempts to dig into your program and fi nd as many type-related bugs as possible. PHPStan 
  7. : (key, value ) iterable array mixed  ࢀߟ 


    IUUQTQIQTUBOPSHSEG ff EDFBBBFD
  8. PHPStanͷ΍͍͞͠ಋೖʹ޲͚ͯ PJ Level OK Baseline PHPStan ignoreErrors( Baseline ) Error

    
 (cf: https://phpstan.org/user-guide/ignoring-errors#reporting-unused- ignores) 
  9. ͱͯ΋ࢀߟʹͳΔࢿྉͨͪ PHPStan #phpcon_okinawa pixivFANBOX 
 https://tadsan.fanbox.cc/posts/4348669 #phpcon_okinawa pixivFANBOX 
 https://tadsan.fanbox.cc/posts/2558149

    level=0 PHPStan(Larastan) - Shin x Blog 
 https://blog.shin1x1.com/entry/getting-stated-with-phpstan CI / Great static analysis with CI - Speaker Deck 
 https://speakerdeck.com/oogfranz/great-static-analysis-with-ci