Completed
Push — master ( 8c1053...9934c8 )
by Woody
07:00
created

PhpLoader::load()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 8
ccs 4
cts 4
cp 1
crap 2
rs 9.4285
c 0
b 0
f 0
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