Skip to content

Commit

Permalink
Add static analysis support
Browse files Browse the repository at this point in the history
This change adds PHPStan to statically analyse the code and adds it to
the Composer scripts to simplify running it.
  • Loading branch information
settermjd committed Jan 9, 2025
1 parent 7a4ac4f commit a3c267c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"friendsofphp/php-cs-fixer": "^3.66",
"laminas/laminas-coding-standard": "^3.0",
"monolog/monolog": "^3.8",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^11.5",
"squizlabs/php_codesniffer": "^3.11"
Expand All @@ -46,14 +47,17 @@
"cs-fix": "vendor/bin/phpcbf",
"qa": [
"@cs-check",
"@static-analysis",
"@test"
],
"static-analysis": "vendor/bin/phpstan analyse src test",
"test": "vendor/bin/phpunit"
},
"scripts-descriptions": {
"cs-check": "Run coding standards checks.",
"cs-fix": "Automatically fix coding standard issues.",
"qa": "Run all quality assurance checks on the code",
"static-analysis": "Run PHPStan to statically analyse the code",
"test": "Run unit tests."
},
"config": {
Expand All @@ -68,4 +72,4 @@
"config-provider": "Settermjd\\Middleware\\ConfigProvider"
}
}
}
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a3c267c

Please sign in to comment.