Passed
Push — master ( f5390f...ff2936 )
by Alexander
02:09
created

PhpReader   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 2
b 0
f 0
dl 0
loc 11
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A readRaw() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Composer\Config\Reader;
6
7
/**
8
 * PhpReader - reads PHP files.
9
 */
10
class PhpReader extends AbstractReader
11
{
12 1
    protected function readRaw(string $path)
13
    {
14 1
        $params = $this->builder->getVars()['params'] ?? [];
15
16 1
        $result = static function (array $params) {
17 1
            return require func_get_arg(1);
18 1
        };
19
20 1
        return $result($params, $path);
21
    }
22
}
23