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

DockerClientFacade   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 4
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCommands() 0 3 1
A runDocker() 0 3 1
A runDockerCompose() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexus\DockerClient\Business;
5
use Xervice\Core\Business\Model\Facade\AbstractFacade;
6
7
8
/**
9
 * @method \Nexus\DockerClient\Business\DockerClientBusinessFactory getFactory()
10
 * @method \Nexus\DockerClient\DockerClientConfig getConfig()
11
 */
12
class DockerClientFacade extends AbstractFacade implements DockerClientFacadeInterface
13
{
14
    /**
15
     * @return array
16
     */
17
    public function getCommands()
18
    {
19
        return $this->getFactory()->getCommandList();
20
    }
21
22
    /**
23
     * @param string $command
24
     *
25
     * @return string
26
     */
27
    public function runDockerCompose(string $command) : string
28
    {
29
        return $this->getFactory()->createDockerCompose()->execute($command);
30
    }
31
32
    /**
33
     * @param string $command
34
     *
35
     * @return string
36
     */
37
    public function runDocker(string $command) : string
38
    {
39
        return $this->getFactory()->createDocker()->execute($command);
40
    }
41
}