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 — 1.x ( ecb649...535f6c )
by Théo
13:20
created

BundlesResolver   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 3
c 2
b 1
f 1
lcom 0
cbo 2
dl 0
loc 25
ccs 13
cts 13
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolveBundles() 0 19 3
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;
13
14
use Symfony\Bundle\FrameworkBundle\Console\Application;
15
16
/**
17
 * @author Théo FIDRY <[email protected]>
18
 */
19
class BundlesResolver implements BundlesResolverInterface
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24 51
    public function resolveBundles(Application $application, array $names)
25
    {
26 51
        $bundles = $application->getKernel()->getBundles();
27
28 51
        $result = [];
29 51
        foreach ($names as $name) {
30 51
            if (false === isset($bundles[$name])) {
31 3
                throw new \RuntimeException(sprintf(
32 3
                    'The bundle "%s" was not found. Bundles available are: %s.',
33 3
                    $name,
34 3
                    implode('", "', array_keys($bundles))
35 3
                ));
36
            }
37
38 51
            $result[$name] = $bundles[$name];
39 51
        }
40
41 51
        return $result;
42
    }
43
}
44