ShellBusinessFactory::createExecutor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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
}