Controller::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace System;
4
5
abstract class Controller
6
{
7
    /**
8
     * Application Object
9
     *
10
     * @var \System\Application
11
     */
12
    protected $app;
13
14
    public function __construct(Application $app)
15
    {
16
        $this->app = $app;
17
    }
18
19
    /**
20
     * Call shared Application Objects dynamically
21
     *
22
     * @param string $key
23
     * @return object
24
     */
25
    public function __get($key)
26
    {
27
        return $this->app->get($key);
28
    }
29
}
30