PhpLoader   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isSupported() 0 4 1
A load() 0 8 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Northwoods\Config\Loader;
5
6
class PhpLoader implements LoaderInterface
7
{
8 4
    public static function isSupported(): bool
9
    {
10 4
        return true;
11
    }
12
13 3
    public function load(string $path): array
14
    {
15 3
        if (is_file("$path.php")) {
16 3
            return require "$path.php";
17
        }
18
19 3
        return [];
20
    }
21
}
22