FeatureInstallTaskController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A install() 0 7 1
1
<?php
2
namespace PSB\Core\Feature;
3
4
5
use PSB\Core\ObjectBuilder\BuilderInterface;
6
7
class FeatureInstallTaskController
8
{
9
    /**
10
     * @var callable
11
     */
12
    private $taskFactory;
13
14
    /**
15
     * @param callable $taskFactory
16
     */
17 4
    public function __construct(callable $taskFactory)
18
    {
19 4
        $this->taskFactory = $taskFactory;
20 4
    }
21
22
    /**
23
     * @param BuilderInterface $builder
24
     */
25 2
    public function install(BuilderInterface $builder)
26
    {
27 2
        $taskFactory = $this->taskFactory;
28
        /** @var FeatureInstallTaskInterface $installTask */
29 2
        $installTask = $taskFactory($builder);
30 2
        $installTask->install();
31 2
    }
32
}
33