Completed
Pull Request — master (#85)
by Simone
04:00
created

Configurator::__call()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
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