Skip to content

Commit

Permalink
feature: removed phpcpd, introduced PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-s committed Jun 11, 2024
1 parent ef634c6 commit 91e6d5b
Show file tree
Hide file tree
Showing 4 changed files with 590 additions and 23 deletions.
23 changes: 2 additions & 21 deletions bin/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,5 @@

mkdir -p ./build/logs

file=/tmp/psr-2-rsd_ruleset_`date +"%d"`.xml
url=https://raw.githubusercontent.com/rene-s/psr-2-rsd/master/psr-2-rsd_ruleset.xml
size=`stat --printf="%s" $file 2>/dev/null`

if [ ! -f $file ] || [ $size -eq 0 ]; then
wget $url -O $file
fi

if [ -f $file ]; then
./vendor/bin/phpcs \
--report=checkstyle \
--report-file=./build/logs/checkstyle.xml \
--standard=./build/phpcs.xml \
-v ./src ./test \
--ignore=./test/bootstrap.php \
--ignore=./test/ui \
--standard=$file
fi

./vendor/bin/phpcpd ./src ./test --exclude=./test/ui
./vendor/bin/phpunit --log-junit ./build/logs/junit.xml test
./vendor/bin/phpstan analyse --configuration phpstan.neon src test
./vendor/bin/phpunit --log-junit ./build/logs/junit.xml test
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"require-dev": {
"monolog/monolog": " ~2.9",
"phpunit/phpunit": "~9.6",
"sebastian/phpcpd": "~6.0",
"squizlabs/php_codesniffer": "~3.7",
"phpunit/php-timer": "~5.0",
"fzaninotto/faker": "~1.5"
"fzaninotto/faker": "~1.5",
"phpstan/phpstan": "^1.11"
},
"type": "library",
"autoload": {
Expand Down
Loading

0 comments on commit 91e6d5b

Please sign in to comment.