Completed
Push — master ( bf1c9e...8c1053 )
by Woody
13s
created

PhpLoader   A

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
3
namespace Northwoods\Config\Loader;
4
5
class PhpLoader implements LoaderInterface
6
{
7 4
    public static function isSupported()
8
    {
9 4
        return true;
10
    }
11
12 3
    public function load($path)
13
    {
14 3
        if (is_file("$path.php")) {
15 3
            return require "$path.php";
16
        } else {
17 3
            return [];
18
        }
19
    }
20
}
21