DockerClientFacade::runDockerCompose()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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