Psalm: suppress notice about preg_split $flags

As discussed in the PR:
> > Argument 4 of preg_split expects 0|1|2|3|4|5|6|7, parent type int provided (see https://psalm.dev/193)
>
> I believe this issue is for the `phpDocumentor\Reflection\Utils` class and expects the `pregSplit()` method to apply input validation to the value received for `$flags` before passing it off to the PHP native `preg_split()` function.
>
> IMO that's taking things a little too far as PHP will handle this internally without errors.
> See: https://3v4l.org/NdDRK
This commit is contained in:
jrfnl
2021-08-08 21:32:56 +02:00
committed by Jaapio
parent b7f9b17881
commit 93198fae49
+7
View File
@@ -53,5 +53,12 @@
<file name="src/Utils.php"/> <file name="src/Utils.php"/>
</errorLevel> </errorLevel>
</InvalidReturnStatement> </InvalidReturnStatement>
<ArgumentTypeCoercion>
<errorLevel type="info">
<!-- PHP handles invalid preg_split flags just fine. -->
<file name="src/Utils.php"/>
</errorLevel>
</ArgumentTypeCoercion>
</issueHandlers> </issueHandlers>
</psalm> </psalm>