Completed
Pull Request — develop (#512)
by Adrian
16:23 queued 09:34
created

GravitonProxyBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Provide a Proxy for third party APIs.
4
 */
5
6
namespace Graviton\ProxyBundle;
7
8
use Graviton\BundleBundle\GravitonBundleInterface;
9
use Graviton\ProxyBundle\DependencyInjection\Compiler\ApiDefinitionLoaderPass;
10
use Graviton\ProxyBundle\DependencyInjection\Compiler\TransformerPass;
11
use Graviton\ProxyExtensionBundle\GravitonProxyExtensionBundle;
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
use Symfony\Component\HttpKernel\Bundle\Bundle;
14
15
/**
16
 * GravitonProxyBundle
17
 *
18
 * @author  List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
19
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
20
 * @link    http://swisscom.ch
21
 */
22
class GravitonProxyBundle extends Bundle implements GravitonBundleInterface
23
{
24
25
    /**
26
     * {@inheritDoc}
27
     *
28
     * @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use GravitonProxyExtensionBundle[].

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
29
     */
30 8
    public function getBundles()
31
    {
32
        return array(
33 8
            new GravitonProxyExtensionBundle(),
34 4
        );
35
    }
36
37
    /**
38
     * {@inheritDoc}
39
     *
40
     * @param ContainerBuilder $container Symfony Service container
41
     *
42
     * @return void
43
     */
44 2
    public function build(ContainerBuilder $container)
45
    {
46 2
        $container->addCompilerPass(new TransformerPass());
47 2
        $container->addCompilerPass(new ApiDefinitionLoaderPass());
48 2
    }
49
}
50