Skip to content

Commit

Permalink
Add PHPStan analysis (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
decodekult authored Apr 1, 2024
1 parent 56786fc commit edcb52e
Show file tree
Hide file tree
Showing 10 changed files with 641 additions and 15 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: OTGS PHP UNIT
run-name: PHP Unit at ${{ github.ref_name }}
name: OTGS PHP TEST
run-name: PHP TEST at ${{ github.ref_name }}

on: [push, pull_request]

Expand All @@ -20,5 +20,8 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run test suite
- name: Run unit test suite
run: ./vendor/bin/phpunit

- name: Run static test suite
run: ./vendor/bin/phpstan
16 changes: 10 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,26 @@
"config": {
"sort-packages": true,
"platform": {
"php": "5.6"
"php": "7.4"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"roave/security-advisories": "dev-master",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"otgs/unit-tests-framework": "~1.2.0",
"sebastian/phpcpd": "^3.0",
"squizlabs/php_codesniffer": "~3",
"phpcompatibility/php-compatibility": "*",
"phpcompatibility/phpcompatibility-wp": "*",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"roave/security-advisories": "dev-master",
"sebastian/phpcpd": "^3.0",
"squizlabs/php_codesniffer": "~3",
"szepeviktor/phpstan-wordpress": "^1.3",
"wp-coding-standards/wpcs": "^0"
},
"scripts": {
Expand Down
297 changes: 294 additions & 3 deletions composer.lock

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

Loading

0 comments on commit edcb52e

Please sign in to comment.