- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Closed
Copy link
Labels
Description
Since upgrading to 2.8.1 integer types on method arguments have been throwing TypeHintMissing
instead of ScalarTypeHintMissing
.
Config:
<?xml version="1.0"?> <ruleset name="graze/standards"> <description>The graze PHP coding standard as defined in graze/standards.</description> <rule ref="vendor/graze/standards/PHP/CodeSniffer/Graze/ruleset.xml" /> <rule ref="Squiz.Commenting.FunctionComment"> <exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing" /> </rule> </ruleset>
Code:
/** * @param callable $worker * @param int $limit */ public function receive(callable $worker, $limit = 1) { ... }
2.8.0:
$ docker run --rm -t -v $(pwd):/opt/graze/queue -w /opt/graze/queue graze/php-alpine:test vendor/bin/phpcs -p --warning-severity=0 -s src/ tests/ ...................................... Time: 1.49 secs; Memory: 10Mb
2.8.1:
$ docker run --rm -t -v $(pwd):/opt/graze/queue -w /opt/graze/queue graze/php-alpine:test vendor/bin/phpcs -p --warning-severity=0 -s src/ tests/ FILE: /opt/graze/queue/src/Client.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 71 | ERROR | Type hint "integer" missing for $limit | | (Squiz.Commenting.FunctionComment.TypeHintMissing) ----------------------------------------------------------------------