Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 10 | public function search($entry) |
|
20 | { |
||
21 | 10 | $data = TrimContentTransformer::trim($this->fileReader->read()); |
|
22 | |||
23 | 10 | if (in_array($entry, $data)) { |
|
24 | 2 | return true; |
|
25 | } |
||
26 | |||
27 | 8 | foreach ($data as $item) { |
|
28 | 7 | if (0 === strpos($entry, $item)) { |
|
29 | 4 | return true; |
|
30 | } |
||
31 | 8 | } |
|
32 | |||
33 | 4 | return false; |
|
34 | } |
||
35 | |||
46 |