YamlLoader::loadFile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Yii 2 config loader
4
 *
5
 * @see       https://github.com/sergeymakinen/yii2-config
6
 * @copyright Copyright (c) 2016 Sergey Makinen (https://makinen.ru)
7
 * @license   https://github.com/sergeymakinen/yii2-config/blob/master/LICENSE The MIT License
8
 */
9
10
namespace sergeymakinen\yii\config;
11
12
use Symfony\Component\Yaml\Yaml;
13
14
/**
15
 * YAML config loader.
16
 */
17
class YamlLoader extends ArrayLoader
18
{
19
    /**
20
     * @inheritDoc
21
     */
22 5
    protected function loadFile($path)
23
    {
24 5
        return Yaml::parse(file_get_contents($path));
25
    }
26
}
27