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 ( ed81f3...cf83d8 )
by Gabriel
05:44
created

ContainerAwareTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 71.43%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 37
ccs 5
cts 7
cp 0.7143
rs 10
c 1
b 0
f 1
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A hasContainer() 0 4 1
A getContainer() 0 4 1
A setContainer() 0 5 1
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 1
    public function getContainer()
22
    {
23 1
        return $this->container;
24
    }
25
26
    /**
27
     * Set a container.
28
     *
29
     * @param  \Nip\Container\ContainerInterface $container
30
     * @return $this
31
     */
32 1
    public function setContainer(ContainerInterface $container)
33
    {
34 1
        $this->container = $container;
35 1
        return $this;
36
    }
37
38
    /**
39
     * @return bool
40
     */
41
    public function hasContainer()
42
    {
43
        return $this->container instanceof ContainerInterface;
44
    }
45
}