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

CustomCommandFacade::hydrateCommands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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