ShellBusinessFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createShellProvider() 0 4 1
A createExecutor() 0 3 1
1
<?php
2
3
4
namespace Nexus\Shell\Business;
5
6
7
use Nexus\Shell\Business\Model\Executor\Exec;
8
use Nexus\Shell\Business\Model\Executor\ExecutorInterface;
9
use Nexus\Shell\Business\Model\ShellProvider;
10
use Nexus\Shell\Business\Model\ShellProviderInterface;
11
use Xervice\Core\Business\Model\Factory\AbstractBusinessFactory;
12
13
class ShellBusinessFactory extends AbstractBusinessFactory
14
{
15
    /**
16
     * @return \Nexus\Shell\Business\Model\ShellProvider
17
     */
18 1
    public function createShellProvider(): ShellProviderInterface
19
    {
20 1
        return new ShellProvider(
21 1
            $this->createExecutor()
22
        );
23
    }
24
25
    /**
26
     * @return \Nexus\Shell\Business\Model\Executor\ExecutorInterface
27
     */
28 1
    public function createExecutor() : ExecutorInterface
29
    {
30 1
        return new Exec();
31
    }
32
}