diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68758c90..ae1b3dbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,4 +45,4 @@ jobs: run: composer run-script phpstan - name: Run code style check - run: composer run-script php-cs -- --format=checkstyle | cs2pr + run: composer run-script check-cs -- --format=checkstyle | cs2pr diff --git a/composer.json b/composer.json index 3b397169..b6eb4788 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "scripts": { "fix-cs": "php-cs-fixer fix -v --config=.php_cs --show-progress=estimating", "phpstan": "phpstan analyse -c phpstan.neon", - "php-cs": "php-cs-fixer fix -v --diff --config=.php_cs --dry-run --show-progress=estimating", + "check-cs": "php-cs-fixer fix -v --diff --config=.php_cs --dry-run --show-progress=estimating", "test": "phpunit -vc phpunit.xml" }, "extra": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f44b44e1..35573fbd 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -36,7 +36,7 @@ parameters: path: src/bundle/Controller/ContentController.php - - message: "#^Parameter \\#1 \\$string of static method EzSystems\\\\EzRecommendationClient\\\\Helper\\\\ParamsConverterHelper\\:\\:getArrayFromString\\(\\) expects string, string\\|null given\\.$#" + message: "#^Parameter \\#1 \\$string of static method EzSystems\\\\EzRecommendationClient\\\\Helper\\\\ParamsConverterHelper\\:\\:getArrayFromString\\(\\) expects string, bool\\|float\\|int\\|string\\|null given\\.$#" count: 1 path: src/bundle/Controller/ContentController.php @@ -50,6 +50,11 @@ parameters: count: 1 path: src/bundle/Controller/ContentController.php + - + message: "#^Property EzSystems\\\\EzRecommendationClient\\\\SPI\\\\Content\\:\\:\\$lang \\(string\\|null\\) does not accept bool\\|float\\|int\\|string\\|null\\.$#" + count: 1 + path: src/bundle/Controller/ContentController.php + - message: "#^Method EzSystems\\\\EzRecommendationClientBundle\\\\Controller\\\\ContentTypeController\\:\\:getQuery\\(\\) has parameter \\$parameterBag with no value type specified in iterable type Symfony\\\\Component\\\\HttpFoundation\\\\ParameterBag\\.$#" count: 1 @@ -76,7 +81,12 @@ parameters: path: src/bundle/Controller/ContentTypeController.php - - message: "#^Property EzSystems\\\\EzRecommendationClient\\\\SPI\\\\Content\\:\\:\\$fields \\(array\\\\) does not accept string\\|null\\.$#" + message: "#^Property EzSystems\\\\EzRecommendationClient\\\\SPI\\\\Content\\:\\:\\$fields \\(array\\\\) does not accept bool\\|float\\|int\\|string\\|null\\.$#" + count: 1 + path: src/bundle/Controller/ContentTypeController.php + + - + message: "#^Property EzSystems\\\\EzRecommendationClient\\\\SPI\\\\Content\\:\\:\\$lang \\(string\\|null\\) does not accept bool\\|float\\|int\\|string\\|null\\.$#" count: 1 path: src/bundle/Controller/ContentTypeController.php @@ -1010,11 +1020,6 @@ parameters: count: 1 path: src/lib/Mapper/ExportRequestMapper.php - - - message: "#^Parameter \\#2 \\$default of method Symfony\\\\Component\\\\HttpFoundation\\\\InputBag\\:\\:get\\(\\) expects string\\|null, int given\\.$#" - count: 1 - path: src/lib/Mapper/ExportRequestMapper.php - - message: "#^Property EzSystems\\\\EzRecommendationClient\\\\SPI\\\\Content\\:\\:\\$fields \\(array\\\\) does not accept string\\|null\\.$#" count: 1