Passed
Push — main ( 70477e...e06c77 )
by Thierry
02:21
created

FacadesBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 25
rs 10
c 3
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A getFacadeService() 0 3 1
1
<?php
2
3
namespace Lagdo\Symfony\Facades;
4
5
use Symfony\Component\HttpKernel\Bundle\Bundle;
6
7
class FacadesBundle extends Bundle
8
{
9
    /**
10
     * @var Container
11
     */
12
    private static $serviceContainer = null;
13
14
    /**
15
     * @param string $serviceId
16
     *
17
     * @return mixed|null
18
     */
19
    public static function getFacadeService(string $serviceId)
20
    {
21
        return self::$serviceContainer->getService($serviceId);
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27
    public function boot()
28
    {
29
        parent::boot();
30
31
        self::$serviceContainer = new Container($this->container);
32
    }
33
}
34