ContainerAwareTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setContainer() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[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 ONGR\CookiesBundle\DependencyInjection;
13
14
use Symfony\Component\DependencyInjection\ContainerInterface;
15
16
/**
17
 * ContainerAware trait.
18
 *
19
 * Use this, instead of \Symfony\Component\DependencyInjection\ContainerAwareTrait, because latter one is available
20
 * only in Symfony v2.4.
21
 */
22
trait ContainerAwareTrait
23
{
24
    /**
25
     * @var ContainerInterface
26
     */
27
    protected $container;
28
29
    /**
30
     * Sets the Container associated with this Controller.
31
     *
32
     * @param ContainerInterface $container A ContainerInterface instance.
33
     */
34
    public function setContainer(ContainerInterface $container = null)
35
    {
36
        $this->container = $container;
37
    }
38
}
39