PhpReader   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
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 12
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A readRaw() 0 10 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 2
    protected function readRaw(string $path)
13
    {
14 2
        $params = $this->builder->getVars()['params'] ?? [];
15
16 2
        $result = static function (array $params) {
17 2
            return require func_get_arg(1);
18 2
        };
19
20
        /** @psalm-suppress TooManyArguments */
21 2
        return $result($params, $path);
22
    }
23
}
24