Skip to content

Added phpmd support for code quality checks #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHP lint & test
name: PHP lint, scan & test

on: [push, pull_request]

Expand Down Expand Up @@ -27,6 +27,12 @@ jobs:
- name: Run PHPCS Lint
run: composer lint

- name: Run PHPStan
run: composer phpstan

- name: Run PHPMD
run: composer phpmd

- name: Run PHPUnit tests
run: composer test

Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpunit": "^11.1",
"slevomat/coding-standard": "^8.15",
"squizlabs/php_codesniffer": "^3.10"
"squizlabs/php_codesniffer": "^3.10",
"phpmd/phpmd": "^2.15"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -45,6 +46,7 @@
"lint": "phpcs",
"lint:fix": "phpcbf",
"php:badge": "bin/coverage-badge coverage/clover.xml badges/php.svg PHP",
"phpmd": "phpmd coverage-badge.php,src text phpmd.xml --color",
"phpstan": "phpstan analyse --memory-limit=2048M",
"test": "phpunit --testdox --coverage-clover coverage/clover.xml --coverage-html coverage --coverage-filter src/"
}
Expand Down
Loading