Skip to content

Commit

Permalink
Fix RiskyTruthyFalsyComparison (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioeatgoat committed Jul 3, 2024
1 parent 89128a5 commit 3ca8344
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Inpsyde/Helpers/FunctionDocBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static function tag(string $tag, File $file, int $position): array
{
$tagName = '@' . ltrim($tag, '@');
$tags = static::allTags($file, $position);
if (empty($tags[$tagName])) {
if (!isset($tags[$tagName]) || $tags[$tagName] === []) {
return [];
}

Expand Down
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
<MixedAssignment errorLevel="suppress" />
<RedundantCastGivenDocblockType errorLevel="suppress" />
<RedundantConditionGivenDocblockType errorLevel="suppress" />

<!-- Suppressing that can be removed when minimum PHP version will become 8.3 -->
<MissingClassConstType errorLevel="suppress" />
</issueHandlers>
</psalm>

0 comments on commit 3ca8344

Please sign in to comment.