Passed
Pull Request — master (#3)
by Bartosz
04:27
created

ProcessFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 11
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * File:ProcessFactory.php
6
 *
7
 * @author Maciej Sławik <[email protected]>
8
 * @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl)
9
 */
10
11
namespace LizardMedia\AdminIndexer\Model\Adapter\ReactPHP\ChildProcess;
12
13
use LizardMedia\AdminIndexer\Api\Adapter\ReactPHP\ChildProcess\ProcessFactoryInterface;
14
use React\ChildProcess\Process;
15
16
/**
17
 * Class ProcessFactory
18
 * @package LizardMedia\AdminIndexer\Model\Adapter\ReactPHP
19
 */
20
class ProcessFactory implements ProcessFactoryInterface
21
{
22
    /**
23
     * @param string $command
24
     * @return Process
25
     */
26
    public function create(string $command): Process
27
    {
28
        return new Process($command);
29
    }
30
}
31