Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
12290 | 2 | public static function substr_ileft(string $haystack, string $needle): string |
|
12291 | { |
||
12292 | 2 | if ($haystack === '') { |
|
12293 | 2 | return ''; |
|
12294 | } |
||
12295 | |||
12296 | 2 | if ($needle === '') { |
|
12297 | 2 | return $haystack; |
|
12298 | } |
||
12299 | |||
12300 | 2 | if (self::str_istarts_with($haystack, $needle)) { |
|
12301 | 2 | $haystack = (string) \mb_substr($haystack, (int) self::strlen($needle)); |
|
12302 | } |
||
12303 | |||
12304 | 2 | return $haystack; |
|
12305 | } |
||
14634 |