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

PhpReader   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 12
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A readRaw() 0 10 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