GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Ayaml::file()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
c 5
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
1
<?php
2
3
namespace Ayaml;
4
5
use Ayaml\Fixture\YamlData;
6
7
/**
8
 * Class Ayaml
9
 * @package Ayaml
10
 */
11
class Ayaml
12
{
13
    /**
14
     * @var array
15
     */
16
    private static $basePaths = [];
17
18
    /**
19
     * @param string $fileName
20
     * @return Container
21
     * @throws AyamlBasePathNotFoundException
22
     */
23
    public static function file($fileName)
24
    {
25
        if (empty(self::$basePaths)) {
26
            throw new AyamlBasePathNotFoundException();
27
        }
28
29
        $yamlData = YamlData::load(self::$basePaths, $fileName);
30
31
        return new Container($yamlData);
32
    }
33
34
    /**
35
     * @param string $basePath
36
     */
37
    public static function registerBasePath($basePath)
38
    {
39
        self::$basePaths[] = preg_replace('/\/$/', '', $basePath);
40
    }
41
42
    /**
43
     * @param Container $container
44
     * @return ContainerCollection
45
     */
46
    public static function seq(Container $container)
47
    {
48
        return new ContainerCollection($container);
49
    }
50
}
51