Phpinspectionsea: 'i' modifier is ambiguous false positive

Created on 6 Sep 2019  路  3Comments  路  Source: kalessil/phpinspectionsea


| Subject | Details |
| :------------- | :---------------------------------------------------------------------------- |
| Plugin | Php Inspections (EA Extended) |
| Language level | PHP 7.1 |

Current behaviour

says 'i' modifier is ambiguous (no alphabet characters in a given pattern), but we do have a-z in it it's just a multiline regex, it probably does not check multiple lines

Expected behaviour

don't suggest removing i modifier

Example:

 private const REGEX = '/^
        (?P<id>\d+)                         # Numeric ID
        (?P<segment>[a-z]{1})               # Segment string letter
        (?P<revision>\d+)?                  # Revision optional if 0
    $/iDx';
bug / false-positive fixed

All 3 comments

Looks like a bug, thank you for reporting @Gamesh.

Fixed!

thank you

Was this page helpful?
0 / 5 - 0 ratings