Passed
Push — master ( 3376db...1497f5 )
by Mike
12:25
created

DockerClientFactory::getShellFacade()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
4
namespace Nexus\DockerClient;
5
6
7
use Nexus\DockerClient\Business\Docker;
8
use Nexus\DockerClient\Business\DockerCompose;
9
use Xervice\Core\Factory\AbstractFactory;
10
11
/**
12
 * @method \Nexus\DockerClient\DockerClientConfig getConfig()
13
 */
14
class DockerClientFactory extends AbstractFactory
15
{
16
    /**
17
     * @return \Nexus\DockerClient\Business\DockerCompose
18
     */
19
    public function createDockerCompose()
20
    {
21
        return new DockerCompose(
22
            $this->getShellFacade()
23
        );
24
    }
25
26
    /**
27
     * @return \Nexus\DockerClient\Business\Docker
28
     */
29
    public function createDocker()
30
    {
31
        return new Docker(
32
            $this->getShellFacade()
33
        );
34
    }
35
36
    /**
37
     * @return array
38
     */
39
    public function getCommandList()
40
    {
41
        return $this->getDependency(DockerClientDependencyProvider::COMMAND_LIST);
42
    }
43
44
    /**
45
     * @return \Nexus\Shell\ShellFacade
46
     */
47
    public function getShellFacade()
48
    {
49
        return $this->getDependency(DockerClientDependencyProvider::SHELL_FACADE);
50
    }
51
}