| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 129 | public function __invoke($input) |
|
| 38 | { |
||
| 39 | 129 | if (! is_string($input)) { |
|
| 40 | 32 | return false; |
|
| 41 | } |
||
| 42 | |||
| 43 | 97 | $search = $this->getValue(); |
|
| 44 | |||
| 45 | 97 | if (! is_string($search)) { |
|
| 46 | 24 | return false; |
|
| 47 | } |
||
| 48 | |||
| 49 | 73 | if ((bool) $this->getValue2()) { |
|
| 50 | 57 | return $this->match($search, $input); |
|
| 51 | } |
||
| 52 | |||
| 53 | 16 | return $this->match(strtolower($search), strtolower($input)); |
|
| 54 | } |
||
| 55 | } |
||
| 56 |