Skip to content

Commit

Permalink
Remove return type to prevent PHP-CS fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tigitz committed May 4, 2024
1 parent d59d6c3 commit 3ad24ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/MisspellingHandler/MisspellingHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ interface MisspellingHandlerInterface
/**
* @param MisspellingInterface[] $misspellings
*/
public function handle(iterable $misspellings): mixed;
public function handle(iterable $misspellings);
}

0 comments on commit 3ad24ba

Please sign in to comment.