| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php # -*- coding: utf-8 -*- |
||
| 51 | 2 | protected function strposa(string $haystack, array $needle, int $offset = 0): bool |
|
| 52 | 2 | { |
|
| 53 | |||
| 54 | 2 | foreach ($needle as $query) { |
|
| 55 | // If we found the string only on position 0. |
||
| 56 | 2 | if (strpos($haystack, $query, $offset) === 0) { |
|
| 57 | 2 | return true; |
|
| 58 | } // stop on first false result |
||
| 59 | } |
||
| 60 | |||
| 61 | 2 | return false; |
|
| 62 | } |
||
| 64 |