Completed
Push — develop ( fbe971...cec1b5 )
by Paul
02:00
created

Executor::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PhpUnitGen\Executor;
4
5
use PhpUnitGen\Executor\ExecutorInterface\ExecutorInterface;
6
use PhpUnitGen\Parser\ParserInterface\PhpParserInterface;
7
8
/**
9
 * Class Executor.
10
 *
11
 * @author     Paul Thébaud <[email protected]>.
12
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
13
 * @license    https://opensource.org/licenses/MIT The MIT license.
14
 * @link       https://github.com/paul-thebaud/phpunit-generator
15
 * @since      Class available since Release 2.0.0.
16
 */
17
class Executor implements ExecutorInterface
18
{
19
    /**
20
     * @var PhpParserInterface $phpFileParser The php file parser.
21
     */
22
    private $phpFileParser;
23
24
    /**
25
     * Executor constructor.
26
     *
27
     * @param PhpParserInterface $phpFileParser The php file parser.
28
     */
29
    public function __construct(
30
        PhpParserInterface $phpFileParser
31
    ) {
32
        $this->phpFileParser = $phpFileParser;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function invoke(string $code): string
39
    {
40
        $phpFileModel = $this->phpFileParser->invoke($code);
0 ignored issues
show
Unused Code introduced by
The assignment to $phpFileModel is dead and can be removed.
Loading history...
41
42
        /** @todo ... */
43
44
        return '';
45
    }
46
}
47