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

CommandProvider::provideCommands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
4
namespace Nexus\DynamicModules\Communication\Provider;
5
6
7
use Nexus\Console\Provider\CommandProviderInterface;
8
use Nexus\DockerClient\Communication\Command\Compose\DockerComposeRmCommand;
9
use Nexus\DockerClient\Communication\Command\Compose\DockerComposeUpCommand;
10
use Nexus\DockerClient\Communication\Command\Exec\DockerExecCommand;
11
use Nexus\DockerClient\Communication\Command\Volume\VolumeCreateCommand;
12
use Nexus\DockerClient\Communication\Command\Volume\VolumeRemoveCommand;
13
use Xervice\Config\XerviceConfig;
14
use Xervice\Core\Config\ConfigInterface;
15
use Xervice\Core\Locator\AbstractWithLocator;
16
17
/**
18
 * @method \Nexus\DynamicModules\CustomCommandFacade getFacade()
19
 */
20
class CommandProvider extends AbstractWithLocator implements CommandProviderInterface
21
{
22
    /**
23
     * @param array $commands
24
     *
25
     * @return array
26
     * @throws \Core\Locator\Dynamic\ServiceNotParseable
27
     * @throws \Xervice\Config\Exception\ConfigNotFound
28
     */
29
    public function provideCommands(array $commands): array
30
    {
31
        return $this->getFacade()->hydrateCommands(
32
            $commands
33
        );
34
    }
35
}