ProcessFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 8
cts 8
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 6
crap 1
1
<?php
2
3
namespace MyOnlineStore\Bundle\RabbitMqManagerBundle\Process;
4
5
use Symfony\Component\Process\Process as SymfonyProcess;
6
7
final class ProcessFactory implements ProcessFactoryInterface
8
{
9
    /**
10
     * @inheritdoc
11
     */
12 1
    public function create($commandLine, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = [])
13
    {
14 1
        return new Process(
15 1
            $commandLine,
16 1
            $cwd,
17 1
            $env,
18 1
            $input,
19 1
            $timeout,
20
            $options
21 1
        );
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27 1
    public function createFromProcess(SymfonyProcess $process)
28
    {
29 1
        return new Process(
30 1
            $process->getCommandLine(),
31 1
            $process->getWorkingDirectory(),
32 1
            $process->getEnv(),
33 1
            $process->getInput(),
34 1
            $process->getTimeout(),
35 1
            $process->getOptions()
0 ignored issues
show
Deprecated Code introduced by
The method Symfony\Component\Process\Process::getOptions() has been deprecated with message: since version 3.3, to be removed in 4.0.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
36 1
        );
37
    }
38
}
39