ProcessFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 32
ccs 17
cts 17
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 11 1
A createFromProcess() 0 11 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