Skip to content

Commit 19229f9

Browse files
committed
Fix Psalm for PHP 7.4
1 parent 2d24f6d commit 19229f9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Inpsyde/Helpers/FunctionDocBlock.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,10 @@ public static function normalizeTypesString(string $typesString): array
170170
if (strpos($splitType, '&') !== false) {
171171
$splitType = rtrim(ltrim($splitType, '('), ')');
172172
} elseif (strpos($splitType, '?') === 0) {
173-
$splitType = substr($splitType, 1);
174-
$hasNull = $hasNull || (($splitType !== '') && ($splitType !== false));
173+
$splitType = (string) substr($splitType, 1);
174+
$hasNull = $hasNull || ($splitType !== '');
175175
}
176-
/** @psalm-suppress DocblockTypeContradiction */
177-
if (($splitType === false) || ($splitType === '')) {
176+
if ($splitType === '') {
178177
continue;
179178
}
180179
if (strtolower($splitType) === 'null') {

0 commit comments

Comments
 (0)