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

DockerClientFacade::getCommands()   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 Xervice\Core\Facade\AbstractFacade;
8
9
/**
10
 * @method \Nexus\DockerClient\DockerClientFactory getFactory()
11
 * @method \Nexus\DockerClient\DockerClientConfig getConfig()
12
 * @method \Nexus\DockerClient\DockerClientClient getClient()
13
 */
14
class DockerClientFacade extends AbstractFacade
15
{
16
    /**
17
     * @return array
18
     */
19
    public function getCommands()
20
    {
21
        return $this->getFactory()->getCommandList();
22
    }
23
24
    /**
25
     * @param string $command
26
     *
27
     * @return string
28
     */
29
    public function runDockerCompose(string $command) : string
30
    {
31
        return $this->getFactory()->createDockerCompose()->execute($command);
32
    }
33
34
    /**
35
     * @param string $command
36
     *
37
     * @return string
38
     */
39
    public function runDocker(string $command) : string
40
    {
41
        return $this->getFactory()->createDocker()->execute($command);
42
    }
43
}