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 — develop ( d36980...ed81f3 )
by Gabriel
04:24
created

ContainerAwareTrait::setContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\Container;
4
5
/**
6
 * Class ContainerAwareTrait
7
 * @package Nip\Container
8
 */
9
trait ContainerAwareTrait
10
{
11
    /**
12
     * @var \Nip\Container\ContainerInterface
13
     */
14
    protected $container;
15
16
    /**
17
     * Get the container.
18
     *
19
     * @return \Nip\Container\ContainerInterface
20
     */
21
    public function getContainer()
22
    {
23
        return $this->container;
24
    }
25
26
    /**
27
     * Set a container.
28
     *
29
     * @param  \Nip\Container\ContainerInterface $container
30
     * @return $this
31
     */
32
    public function setContainer(ContainerInterface $container)
33
    {
34
        $this->container = $container;
35
        return $this;
36
    }
37
38
    /**
39
     * @return bool
40
     */
41
    public function hasContainer()
42
    {
43
        return $this->container instanceof ContainerInterface;
44
    }
45
}