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

SimpleBundleResolver::resolveBundles()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 15
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 8
nc 3
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\Resolver\Bundle;
13
14
use Hautelook\AliceBundle\BundleResolverInterface;
15
use Hautelook\AliceBundle\Exception\Resolver\BundleNotFoundException;
16
use Nelmio\Alice\NotClonableTrait;
17
use Symfony\Bundle\FrameworkBundle\Console\Application;
18
19
/**
20
 * @author Théo FIDRY <[email protected]>
21
 */
22
final class SimpleBundleResolver implements BundleResolverInterface
23
{
24
    use NotClonableTrait;
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function resolveBundles(Application $application, array $names)
30
    {
31
        $bundles = $application->getKernel()->getBundles();
32
33
        $result = [];
34
        foreach ($names as $name) {
35
            if (false === isset($bundles[$name])) {
36
                throw BundleNotFoundException::create($name, $bundles);
37
            }
38
39
            $result[$name] = $bundles[$name];
40
        }
41
42
        return array_values($result);
43
    }
44
}
45