Classic::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Maristela\Cli\Processor;
4
5
use Maristela\Cli\FileHandle;
6
7
class Classic implements IProcessor
8
{
9
    protected $fileHandle;
10
11
    public function __construct(FileHandle $fileHandle)
12
    {
13
        $this->fileHandle = $fileHandle;
14
    }
15
16
    public function compile(string $file) : string
17
    {
18
        $data = $this->fileHandle->getMockData($file);
19
20
        ob_start();
21
22
        extract($data);
23
        require $file;
24
25
        return ob_get_clean();
26
    }
27
}
28