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

FacadesBundle::getFacadeService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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