| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ArrayInspector extends AbstractInteractor |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Gets the index/key of a given element. The comparison of two elements is strict, |
||
| 11 | * that means not only the value but also the type must match. |
||
| 12 | * For objects this means reference equality. |
||
| 13 | * |
||
| 14 | * @param mixed $element The element to search for. |
||
| 15 | * |
||
| 16 | * @return int|string|bool The key/index of the element or FALSE if the element was not found. |
||
| 17 | */ |
||
| 18 | 4 | public function indexOf($element) |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Tests for the existence of an element that satisfies the given predicate. |
||
| 25 | * |
||
| 26 | * @param \Closure $p The predicate. |
||
| 27 | * |
||
| 28 | * @return bool TRUE if the predicate is TRUE for at least one element, FALSE otherwise. |
||
| 29 | */ |
||
| 30 | 1 | public function exists(\Closure $p): bool |
|
| 41 |