Completed
Push — master ( c2ba48...1fd225 )
by Markus
14s queued 12s
created

ProcessFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Jellyfish\ProcessSymfony;
4
5
use Jellyfish\Process\ProcessFactoryInterface;
6
use Jellyfish\Process\ProcessInterface;
7
8
class ProcessFactory implements ProcessFactoryInterface
9
{
10
    protected $tempDir;
11
12
    /**
13
     * @param string $tempDir
14
     */
15
    public function __construct(string $tempDir)
16
    {
17
        $this->tempDir = $tempDir;
18
    }
19
20
    /**
21
     * @param array $command
22
     *
23
     * @return \Jellyfish\Process\ProcessInterface
24
     */
25
    public function create(array $command): ProcessInterface
26
    {
27
        return new Process($command, $this->tempDir);
28
    }
29
}
30