Controller   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __get() 0 4 1
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