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

ProcessFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 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