Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 3 | public function indexAction() |
|
27 | { |
||
28 | 3 | if (empty($this->proxyDir)) { |
|
29 | 1 | $this->getConsole()->writeLine('Proxy dir is not set or empty'); |
|
30 | 1 | return -1; |
|
31 | } |
||
32 | |||
33 | 2 | if (! is_dir($this->proxyDir)) { |
|
34 | 1 | $this->getConsole()->writeLine('Proxy dir does not exist'); |
|
35 | 1 | return -1; |
|
36 | } |
||
37 | |||
38 | 1 | foreach (glob($this->proxyDir . '/*.php') as $file) { |
|
39 | 1 | unlink($file); |
|
40 | 1 | } |
|
41 | |||
42 | 1 | return 0; |
|
43 | } |
||
44 | |||
53 |