mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
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:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user