Test Failed
Push — master ( fdad3b...1a9d53 )
by Mike
07:27
created

CustomCommandFacade   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 24
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hydrateCommands() 0 4 1
A runShell() 0 4 1
1
<?php
2
3
4
namespace Nexus\CustomCommand;
5
6
7
use Xervice\Core\Facade\AbstractFacade;
8
9
/**
10
 * @method \Nexus\CustomCommand\CustomCommandFactory getFactory()
11
 * @method \Nexus\CustomCommand\CustomCommandConfig getConfig()
12
 * @method \Nexus\CustomCommand\CustomCommandClient getClient()
13
 */
14
class CustomCommandFacade extends AbstractFacade
15
{
16
    /**
17
     * @param array $commands
18
     * @param string $directory
19
     * @param bool $recursive
20
     *
21
     * @return array
22
     */
23 3
    public function hydrateCommands(array $commands, string $directory, bool $recursive)
24
    {
25 3
        return $this->getFactory()->createCommandHydrator($directory, $recursive)->hydrateCommands($commands);
26
    }
27
28
    /**
29
     * @param string $command
30
     *
31
     * @return string
32
     */
33
    public function runShell(string $command) : string
34
    {
35
        return $this->getFactory()->getShellFacade()->runCommand($command);
36
    }
37
}