Skip to content

Commit

Permalink
Fix Psalm for PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed Feb 25, 2024
1 parent 2d24f6d commit 19229f9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Inpsyde/Helpers/FunctionDocBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,10 @@ public static function normalizeTypesString(string $typesString): array
if (strpos($splitType, '&') !== false) {
$splitType = rtrim(ltrim($splitType, '('), ')');
} elseif (strpos($splitType, '?') === 0) {
$splitType = substr($splitType, 1);
$hasNull = $hasNull || (($splitType !== '') && ($splitType !== false));
$splitType = (string) substr($splitType, 1);
$hasNull = $hasNull || ($splitType !== '');
}
/** @psalm-suppress DocblockTypeContradiction */
if (($splitType === false) || ($splitType === '')) {
if ($splitType === '') {
continue;
}
if (strtolower($splitType) === 'null') {
Expand Down

0 comments on commit 19229f9

Please sign in to comment.