Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | 44 | public function __invoke(string $input): array |
|
14 | { |
||
15 | 44 | $possibilities = []; |
|
16 | 44 | $len = strlen($input); |
|
17 | |||
18 | 44 | for ($i = 0; $i <= $len; $i++) { |
|
19 | 44 | for ($j = 0; $j <= $len; $j++) { |
|
20 | 44 | $possibilities[] = (string) substr($input, $i, $j); |
|
21 | } |
||
22 | } |
||
23 | |||
24 | 44 | return array_filter(array_unique($possibilities)); |
|
25 | } |
||
27 |