Passed
Pull Request — master (#22)
by Dmitriy
28:42 queued 13:51
created

PhpReader::readRaw()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 10
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Yiisoft\Composer\Config\Reader;
4
5
/**
6
 * PhpReader - reads PHP files.
7
 */
8
class PhpReader extends AbstractReader
9
{
10
    protected function readRaw($path)
11
    {
12
        $result = static function () {
13
            /** @noinspection NonSecureExtractUsageInspection */
14
            extract(func_get_arg(0));
15
16
            return require func_get_arg(1);
17
        };
18
19
        return $result($this->builder->getVars(), $path);
20
    }
21
}
22