Passed
Push — master ( 99427a...7e65af )
by Mike
04:46
created

ShellBusinessFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 18
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 Xervice\Core\Business\Model\Factory\AbstractBusinessFactory;
11
12
class ShellBusinessFactory extends AbstractBusinessFactory
13
{
14
    /**
15
     * @return \Nexus\Shell\Business\Model\ShellProvider
16
     */
17
    public function createShellProvider()
18
    {
19
        return new ShellProvider(
20
            $this->createExecutor()
21
        );
22
    }
23
24
    /**
25
     * @return \Nexus\Shell\Business\Model\Executor\ExecutorInterface
26
     */
27
    public function createExecutor() : ExecutorInterface
28
    {
29
        return new Exec();
30
    }
31
}