Controller::__get()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
namespace App\Controllers;
4
5
class Controller
6
{
7
    protected $container;
8
9
    public function __construct($container)
10
    {
11
        $this->container = $container;
12
    }
13
    
14
    public function __get($property)
15
    {
16
        if ($this->container->{$property}) {
17
            return $this->container->{$property};
18
        }
19
    }
20
}
21