| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 24 | protected function doMatch($actual) |
||
| 25 | { |
||
| 26 | if ($actual instanceof Traversable) { |
||
| 27 | return $this->matchTraversable($actual); |
||
| 28 | } |
||
| 29 | |||
| 30 | if (is_array($actual)) { |
||
| 31 | return array_search($this->expected, $actual, true) !== false; |
||
| 32 | } |
||
| 33 | |||
| 34 | if (is_string($actual)) { |
||
| 35 | return strpos($actual, $this->expected) !== false; |
||
| 36 | } |
||
| 37 | |||
| 38 | throw new InvalidArgumentException('Inclusion matcher requires a string or array'); |
||
| 39 | } |
||
| 40 | |||
| 65 |