Skip to content

Commit 3ca8344

Browse files
Fix RiskyTruthyFalsyComparison (#94)
1 parent 89128a5 commit 3ca8344

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: Inpsyde/Helpers/FunctionDocBlock.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static function tag(string $tag, File $file, int $position): array
101101
{
102102
$tagName = '@' . ltrim($tag, '@');
103103
$tags = static::allTags($file, $position);
104-
if (empty($tags[$tagName])) {
104+
if (!isset($tags[$tagName]) || $tags[$tagName] === []) {
105105
return [];
106106
}
107107

Diff for: psalm.xml

+3
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@
2727
<MixedAssignment errorLevel="suppress" />
2828
<RedundantCastGivenDocblockType errorLevel="suppress" />
2929
<RedundantConditionGivenDocblockType errorLevel="suppress" />
30+
31+
<!-- Suppressing that can be removed when minimum PHP version will become 8.3 -->
32+
<MissingClassConstType errorLevel="suppress" />
3033
</issueHandlers>
3134
</psalm>

0 commit comments

Comments
 (0)