Conditions | 6 |
Paths | 6 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function checkEnv() |
||
13 | { |
||
14 | $success = true; |
||
15 | foreach ($this->_env['cache_types'] as $cache_type) { |
||
16 | if (!is_int($cache_type) || ($cache_type != 0 && $cache_type != 1)) { |
||
17 | $success = false; |
||
18 | } |
||
19 | } |
||
20 | |||
21 | $result = $this->_results->createResult(); |
||
22 | if ($success) { |
||
23 | $status = Result::STATUS_OK; |
||
24 | $message = '<info><comment>cache_types</comment> have correct values.</info>'; |
||
25 | } else { |
||
26 | $status = Result::STATUS_ERROR; |
||
27 | $message = "<error><comment>cache_types</comment> have incorrect values. It should have either '1' or '0' as value.</error>"; |
||
28 | } |
||
29 | |||
30 | $result->setStatus($status); |
||
31 | $result->setMessage($message); |
||
32 | } |
||
33 | } |
||
34 |