Skip to content

Commit

Permalink
Merge pull request #2 from sitegeist/bugfix/typeHints
Browse files Browse the repository at this point in the history
[BUGFIX] Type hints weren’t checked properly
  • Loading branch information
s2b authored Nov 12, 2020
2 parents fc56528 + 18cdeeb commit 3566866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Classes/CodeQuality/Check/ParamTypeCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function check(): array

foreach ($this->configuration['params']['typeHints'] as $config) {
$pattern = $this->createPattern($config['namePattern']);
if (preg_match($pattern, $name)) {
if (preg_match($pattern, $name) && $type !== $config['typeHint']) {
$issues[] = $this->issue($issuePrefix . $config['message'], [
$config['typeHint']
])->setSeverity($config['severity']);
Expand Down

0 comments on commit 3566866

Please sign in to comment.