ModuleManager   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 51
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getManager() 0 3 1
A __invoke() 0 3 1
A __construct() 0 3 1
A run() 0 4 1
A toRun() 0 3 1
1
<?php
2
3
namespace BFW\Install\Core\AppSystems;
4
5
use \BFW\Core\AppSystems\AbstractSystem;
6
use BFW\Install\ModuleManager as Manager;
7
8
class ModuleManager extends AbstractSystem
9
{
10
    /**
11
     * @var \BFW\Install\ModuleManager
12
     */
13
    protected $manager;
14
15
    /**
16
     * Initialize the ModuleManager system
17
     */
18
    public function __construct()
19
    {
20
        $this->manager = new Manager;
21
    }
22
    
23
    /**
24
     * {@inheritdoc}
25
     * 
26
     * @return $this
27
     */
28
    public function __invoke()
29
    {
30
        return $this->manager;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->manager returns the type BFW\Install\ModuleManager which is incompatible with the documented return type BFW\Install\Core\AppSystems\ModuleManager.
Loading history...
31
    }
32
    
33
    /**
34
     * Getter accessor to property manager
35
     * 
36
     * @return \BFW\Install\ModuleManager
37
     */
38
    public function getManager(): Manager
39
    {
40
        return $this->manager;
41
    }
42
    
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function toRun(): bool
47
    {
48
        return true;
49
    }
50
    
51
    /**
52
     * {@inheritdoc}
53
     * Run install of all modules
54
     */
55
    public function run()
56
    {
57
        $this->manager->doAction();
58
        $this->runStatus = true;
59
    }
60
}
61