Skip to content

Commit 98bcacc

Browse files
committed
using || throw
1 parent 3b815db commit 98bcacc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Assert/Filter.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ public static function boolean(callable $filter): void
6868
));
6969
}
7070

71-
if ($returnTypeName !== 'bool') {
72-
throw new InvalidArgumentException(sprintf(
73-
self::MESSAGE,
74-
$returnTypeName
75-
));
76-
}
71+
$returnTypeName === 'bool' || throw new InvalidArgumentException(sprintf(
72+
self::MESSAGE,
73+
$returnTypeName
74+
));
7775
}
7876
}

0 commit comments

Comments
 (0)