Completed
Push — master ( 26c2c8...36ff73 )
by Mikael
07:20
created

AppInjectableTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 23
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setApp() 0 5 1
1
<?php
2
3
namespace Anax\Common;
4
5
/**
6
 * Trait implementing AppInjectableInterface for classes which need to
7
 * be injectad with the $app.
8
 */
9
trait AppInjectableTrait
10
{
11
    /**
12
     * Properties
13
     *
14
     */
15
    private $app;  // Contains all framework resources.
16
17
18
19
    /**
20
     * Inject the $app into this class.
21
     *
22
     * @param object $app containing framework resources.
23
     *
24
     * @return $this for chaining.
25
     */
26 1
    public function setApp($app)
27
    {
28 1
        $this->app = $app;
29 1
        return $this;
30
    }
31
}
32