Passed
Push — develop ( 1026fb...945d40 )
by Felipe
04:55
created

Middleware::__get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace PHPPgAdmin\Middleware;
4
5
class Middleware
6
{
7
    use \PHPPgAdmin\Traits\HelperTrait;
8
    protected $container;
9
    protected $router;
10
11
    public function __construct($container)
12
    {
13
        $this->container = $container;
14
        $this->router    = $container->get('router');
15
    }
16
17
    public function __get($property)
18
    {
19
        if (isset($this->container->{$property})) {
20
            return $this->container->{$property};
21
        }
22
    }
23
}
24