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   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 7
Bugs 0 Features 1
Metric Value
wmc 4
c 7
b 0
f 1
lcom 1
cbo 4
dl 0
loc 40
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A file() 0 10 2
A registerBasePath() 0 4 1
A seq() 0 4 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