Completed
Push — master ( d129c8...00172d )
by Gabriel
03:56
created

HasApplication   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 26
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getApplication() 0 3 1
A getContainer() 0 3 1
1
<?php
2
3
namespace Nip\Http\Kernel\Traits;
4
5
use Nip\Application;
6
7
/**
8
 * Trait HasApplication
9
 * @package Nip\Http\Kernel\Traits
10
 */
11
trait HasApplication
12
{
13
14
    /**
15
     * The application implementation.
16
     *
17
     * @var Application
18
     */
19
    protected $app;
20
21
    /**
22
     * Get the application instance.
23
     *
24
     * @return Application
25
     */
26
    public function getApplication()
27
    {
28
        return $this->app;
29
    }
30
31
    /**
32
     * @return \Nip\Container\Container
33
     */
34
    public function getContainer()
35
    {
36
        return $this->getApplication()->getContainer();
37
    }
38
}
39