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

PhpLoader::isSupported()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
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