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.
Completed
Push — master ( be0626...df8c18 )
by Théo
33:01
created

LocatorRegistry::locateFiles()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 2
1
<?php
2
3
/*
4
 * This file is part of the Hautelook\AliceBundle package.
5
 *
6
 * (c) Baldur Rensch <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Hautelook\AliceBundle\Locator;
13
14
use Hautelook\AliceBundle\FixtureLocatorInterface;
15
use Nelmio\Alice\NotClonableTrait;
16
17
/**
18
 * @author Théo FIDRY <[email protected]>
19
 */
20
final class LocatorRegistry implements FixtureLocatorInterface
21
{
22
    use NotClonableTrait;
23
24
    /**
25
     * @var FixtureLocatorInterface[]
26
     */
27
    private $locators;
28
29
    /**
30
     * @param FixtureLocatorInterface[] $locators
31
     */
32
    public function __construct(array $locators)
33
    {
34
        $this->locators = (function (FixtureLocatorInterface ...$locators) { return $locators; })(...$locators);
35
    }
36
37
    /**
38
     * Locate fixture files found matching the environment name.
39
     *
40
     * For example, if the given fixture path is 'Resources/fixtures', it will try to locate
41
     * the files in the 'Resources/fixtures/*.dev.yml' for each bundle passed ('dev' being the
42
     * environment).
43
     *
44
     * {@inheritdoc}
45
     */
46
    public function locateFiles(array $bundles, string $environment): array
47
    {
48
        $fixtureFiles = [];
49
        foreach ($this->locators as $locator) {
50
            $files = array_flip($locator->locateFiles($bundles, $environment));
51
            $fixtureFiles = $fixtureFiles + $files;
52
        }
53
54
        return array_keys($fixtureFiles);
55
    }
56
}
57