diff --git a/composer.json b/composer.json index 8e3e237..bfbe32c 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,29 @@ "nikic/fast-route": "^1.3" }, "require-dev": { - "phpunit/phpunit": "^7.2", - "php-coveralls/php-coveralls": "^1.0", + "roave/security-advisories": "dev-master", + "phpunit/phpunit": "^7.5", + "php-coveralls/php-coveralls": "^1.1", "phpunit/phpcov": "^5.0", - "zendframework/zend-diactoros": "^1.8" + "zendframework/zend-diactoros": "^1.8", + "squizlabs/php_codesniffer": "^3.3", + "phpstan/phpstan": "^0.10.6" }, "autoload": { "psr-4": { "Selami\\Router\\": "src/" } + }, + "autoload-dev": { + "psr-4": { + "tests\\": "test/" + } + }, + "scripts": { + "unit-tests": "vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml --configuration ./phpunit.xml", + "phpstan": "vendor/bin/phpstan analyse -l 7 src", + "phpstan-test": "vendor/bin/phpstan analyse -l 7 -c phpstan.test.neon test", + "phpcs": "vendor/bin/phpcs --standard=PSR2 src test", + "phpcbf": "vendor/bin/phpcbf --standard=PSR2 src test" } } diff --git a/phpstan.test.neon b/phpstan.test.neon new file mode 100644 index 0000000..e49f6d2 --- /dev/null +++ b/phpstan.test.neon @@ -0,0 +1,5 @@ +parameters: + ignoreErrors: + - '#Call to an undefined method Selami\\Router\\Router::get\(\)#' # magic + - '#Call to an undefined method Selami\\Router\\Router::post\(\)#' # magic + - '#Call to an undefined method Selami\\Router\\Router::nonAvalibleHTTPMethod\(\)#' # testing not available method \ No newline at end of file