| Conditions | 5 |
| Paths | 12 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | public function isValid($value, array $parameters) { |
||
| 38 | $parameterAmount = count($parameters); |
||
| 39 | |||
| 40 | $this->validateParameterCount($parameterAmount); |
||
| 41 | |||
| 42 | $caseInsensitive = $parameterAmount == 1 || $parameterAmount > 1 && $parameters[1]; |
||
| 43 | |||
| 44 | if ($caseInsensitive) { |
||
| 45 | $parameters[0] = strtolower($parameters[0]); |
||
| 46 | $value = strtolower($value); |
||
| 47 | } |
||
| 48 | return in_array($value, array('', null), true) || strpos($value, $parameters[0]) !== false; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |