Conditions | 5 |
Paths | 5 |
Total Lines | 26 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function __invoke(array $descriptor) |
||
44 | { |
||
45 | if ($descriptor[Descriptor::DISABLED]) |
||
46 | { |
||
47 | return false; |
||
48 | } |
||
49 | |||
50 | $module = $this->modules[$descriptor[Descriptor::ID]]; |
||
51 | $errors = new ErrorCollection; |
||
52 | |||
53 | try |
||
54 | { |
||
55 | $is_installed = $module->is_installed($errors); |
||
56 | |||
57 | if ($is_installed && !count($errors)) |
||
58 | { |
||
59 | return false; |
||
60 | } |
||
61 | } |
||
62 | catch (\Exception $e) |
||
63 | { |
||
64 | # there was an error, the module might not be properly installed. |
||
65 | } |
||
66 | |||
67 | return true; |
||
68 | } |
||
69 | } |
||
70 |