diff --git a/.gitmodules b/.gitmodules index 4943841..e3c76c4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "l10n/importer"] path = l10n/importer url = gitea:museum-digital/translations-importer.git +[submodule "classes/MD_QA"] + path = classes/MD_QA + url = gitea:museum-digital/MD_QA.git diff --git a/classes/MD_QA b/classes/MD_QA new file mode 160000 index 0000000..10d5759 --- /dev/null +++ b/classes/MD_QA @@ -0,0 +1 @@ +Subproject commit 10d575901625a2393e6c349df0a9a3e7b4dcbfac diff --git a/composer.json b/composer.json index 03f289e..aebb81a 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,10 @@ { "require": { "phpmailer/phpmailer": "^6.1", - "phpunit/phpunit": "^9.4" + "phpunit/phpunit": "^9.4", + "phpstan/phpstan": "^0.12.57", + "phpstan/phpstan-strict-rules": "^0.12.5", + "ergebnis/phpstan-rules": "^0.15.3", + "phpstan/phpstan-deprecation-rules": "^0.12.5" } } diff --git a/scripts/checkCodeQuality.sh b/scripts/checkCodeQuality.sh index f679637..f65bc1a 100644 --- a/scripts/checkCodeQuality.sh +++ b/scripts/checkCodeQuality.sh @@ -28,7 +28,7 @@ echo "phpcs-errors:$PHPCS_RESULT"; # Run PHPUnit -PHPUNIT_TEST_BASE_DIR="$SCRIPT_DIR/../csvxml.imports.museum-digital.org" +PHPUNIT_TEST_BASE_DIR="$SCRIPT_DIR/../" $(php $PHPUNIT_TEST_BASE_DIR/vendor/bin/phpunit --stderr -c $PHPUNIT_TEST_BASE_DIR/tests/config.xml --testdox $PHPUNIT_TEST_BASE_DIR/tests) PHPUNIT_EC=$? @@ -39,8 +39,8 @@ else echo "phpunit-status:successful"; fi -PHPSTAN_TEST_BASE_DIR="/var/www/vhosts/museum-digital.de/sandkasten.museum-digital.de" -PHPSTAN_CONF_BASE_DIR="/var/www/vhosts/museum-digital.de/csvxml.imports.museum-digital.org" +PHPSTAN_TEST_BASE_DIR="$SCRIPT_DIR/../" +PHPSTAN_CONF_BASE_DIR="$SCRIPT_DIR/../" PHPSTAN_ERRORS=$(php $PHPSTAN_TEST_BASE_DIR/vendor/bin/phpstan analyze --error-format raw -c $PHPSTAN_CONF_BASE_DIR/phpstan.neon -l 8 | wc -l) echo "phpstan-errors:$PHPSTAN_ERRORS"