Passed
Pull Request — master (#39)
by Daniel
02:27
created

ProcessSymfonyFactory::createSymfonyProcess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Jellyfish\ProcessSymfony;
6
7
use Jellyfish\Process\ProcessInterface;
8
use Symfony\Component\Process\Process as SymfonyProcess;
9
10
class ProcessSymfonyFactory
11
{
12
    /**
13
     * @param array $command
14
     *
15
     * @return \Jellyfish\Process\ProcessInterface
16
     */
17
    public function createProcess(array $command): ProcessInterface
18
    {
19
        return new Process(
20
            $command,
21
            $this->createSymfonyProcess($command)
22
        );
23
    }
24
25
    /**
26
     * @param array $command
27
     *
28
     * @return \Symfony\Component\Process\Process
29
     */
30
    protected function createSymfonyProcess(array $command): SymfonyProcess
31
    {
32
        return new SymfonyProcess($command);
33
    }
34
}
35