diff --git a/Makefile b/Makefile index 7dbd44a..0598efd 100644 --- a/Makefile +++ b/Makefile @@ -55,15 +55,15 @@ ti: vendor vendor: $(COMPOSER) update $(DEPS_STRATEGY) - $(EXEC_PHP) composer -d tools/php-cs-fixer update PHP_CS_FIXER = docker-compose run --rm -T php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix -vv --allow-risky=yes phpcs: - PHP_VERSION=8.1 docker-compose run --rm -T php composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer + PHP_VERSION=8.1 $(EXEC_PHP) composer -d tools/php-cs-fixer update PHP_VERSION=8.1 $(PHP_CS_FIXER) --dry-run phpcbf: + PHP_VERSION=8.1 $(EXEC_PHP) composer -d tools/php-cs-fixer update PHP_VERSION=8.1 $(PHP_CS_FIXER) phpstan: vendor diff --git a/phpstan.neon b/phpstan.neon index 185bbe9..9ce79cb 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -18,6 +18,11 @@ parameters: count: 1 path: src/Text/functions.php + - + message: "#^Method PhpSpellcheck\\\\MisspellingHandler\\\\MisspellingHandlerInterface\\:\\:handle\\(\\) has no return type specified\\.$#" + count: 1 + path: src/MisspellingHandler/MisspellingHandlerInterface.php + - message: "#^Function pspell_config_create is unsafe to use\\. It can return FALSE instead of throwing an exception\\. Please add 'use function Safe\\\\pspell_config_create;' at the beginning of the file to use the variant provided by the 'thecodingmachine/safe' library\\.$#" count: 1 diff --git a/src/MisspellingHandler/MisspellingHandlerInterface.php b/src/MisspellingHandler/MisspellingHandlerInterface.php index c608c74..176e0a9 100644 --- a/src/MisspellingHandler/MisspellingHandlerInterface.php +++ b/src/MisspellingHandler/MisspellingHandlerInterface.php @@ -11,5 +11,5 @@ interface MisspellingHandlerInterface /** * @param MisspellingInterface[] $misspellings */ - public function handle(iterable $misspellings): mixed; + public function handle(iterable $misspellings); }