TInjectionAware   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setDI() 0 4 1
1
<?php
2
3
namespace Anax\DI;
4
5
/**
6
 * Interface to implement for DI aware services to let them know of the current $di
7
 *
8
 */
9
trait TInjectionAware
10
{
11
12
    /**
13
     * Properties
14
     */
15
    protected $di; // the service container 
16
17
    /**
18
     * Set the service container to use
19
     *
20
     * @param class $di a service container
21
     *
22
     * @return $this
23
     */
24
    public function setDI($di)
25
    {
26
        $this->di = $di;
27
    }
28
}
29