Conditions | 5 |
Paths | 5 |
Total Lines | 20 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
43 | 6 | public function get ($key) |
|
44 | { |
||
45 | 6 | if (is_array($key)) { |
|
46 | 2 | $response = []; |
|
47 | 2 | foreach ($key as $value) { |
|
48 | 2 | $path = $this->getKeyFilePath($value); |
|
49 | 2 | if (!file_exists($path)) { |
|
50 | 1 | $response[$value] = false; |
|
51 | 1 | continue; |
|
52 | } |
||
53 | 2 | $response[$value] = file_get_contents($path); |
|
54 | } |
||
55 | 2 | return $response; |
|
56 | } |
||
57 | 4 | $path = $this->getKeyFilePath($key); |
|
58 | 4 | if (!file_exists($path)) { |
|
59 | 3 | return false; |
|
60 | } |
||
61 | 2 | return file_get_contents($path); |
|
62 | } |
||
63 | } |
||
64 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.