Skip to main content
[2019-01-08]

Writing better Drupal code with static analysis using PHPStan

#drupal #phpstan #static analysis

PHP is a loosely typed interpreted language. That means we cannot compile our scripts and find possible execution errors without doing explicit inspections of our code. It also means we need to rely on conditional type checking or using phpDoc comments to tell other devs or IDE what kind of value to expect.