InjectServiceLocatorTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A injectServiceLocator() 0 4 1
1
<?php
2
/**
3
 * Ember Db - An embeddable document database for php.
4
 * Copyright (C) 2016 Alexander During
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
 *
19
 * @link      http://github.com/alexanderduring/php-ember-db
20
 * @copyright Copyright (C) 2016 Alexander During
21
 * @license   http://www.gnu.org/licenses GNU General Public License v3.0
22
 */
23
24
namespace EmberDb\Client;
25
26
trait InjectServiceLocatorTrait
27
{
28
    /** @var \EmberDb\Client\ServiceLocator */
29
    private $serviceLocator;
30
31
32
33
    /**
34
     * @param \EmberDb\Client\ServiceLocator $serviceLocator
35
     */
36
    public function injectServiceLocator(ServiceLocator $serviceLocator)
37
    {
38
        $this->serviceLocator = $serviceLocator;
39
    }
40
}
41