Completed
Pull Request — master (#85)
by Simone
02:15
created

Configurator   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A __call() 0 6 1
A resourceName() 0 4 1
A container() 0 4 1
A rewrites() 0 4 1
A globals() 0 4 1
1
<?php
2
3
namespace Sensorario\Resources;
4
5
final class Configurator 
6
{
7
    private $container;
8
9
    private $resourceName;
10
11
    public function __construct(
12
        $resourceName,
13
        Container $container
14
    ) {
15
        $this->resourceName = $resourceName;
16
        $this->container = $container;
17
    }
18
19
    public function __call($method, $bar)
20
    {
21
         return $this->container->$method(
22
             $this->resourceName
23
         );
24
    }
25
26
    public function resourceName()
27
    {
28
        return $this->resourceName;
29
    }
30
31
    public function container()
32
    {
33
        return $this->container;
34
    }
35
36
    public function rewrites()
37
    {
38
        return $this->container->rewrites();
39
    }
40
41
    public function globals()
42
    {
43
        return $this->container->globals();
44
    }
45
}
46