Skip to content

Commit

Permalink
SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation…
Browse files Browse the repository at this point in the history
…: Fixed false positives for int<0, max> and int<min, 100>
  • Loading branch information
kukulich committed Nov 10, 2022
1 parent 9e7b0c0 commit 1c0f295
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SlevomatCodingStandard/Helpers/TypeHintHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public static function isSimpleUnofficialTypeHints(string $typeHint): bool
'empty',
'positive-int',
'negative-int',
'min',
'max',
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,11 @@ public function withNever()
class ConstantExpression
{
}

/**
* @param int<min, 100> $range
* @return int<0, max>
*/
function intRange(array $range): array
{
}

0 comments on commit 1c0f295

Please sign in to comment.