GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( ab57ef...932a6b )
by Steeven
02:30
created

Controller::view()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * This file is part of the O2System Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
12
// ------------------------------------------------------------------------
13
14
namespace O2System\Framework\Http;
15
16
// ------------------------------------------------------------------------
17
18
/**
19
 * Class Controller
20
 *
21
 * @package O2System\Framework\Http
22
 */
23
class Controller extends \O2System\Kernel\Http\Controller
24
{
25
    /**
26
     * Controller::$inherited
27
     *
28
     * Controller inherited flag.
29
     *
30
     * @var bool
31
     */
32
    static public $inherited = false;
33
34
    /**
35
     * Controller::__get
36
     *
37
     * Magic method __get.
38
     *
39
     * @param string $property
40
     *
41
     * @return mixed
42
     */
43
    public function &__get($property)
44
    {
45
        $get[ $property ] = false;
0 ignored issues
show
Comprehensibility Best Practice introduced by
$get was never initialized. Although not strictly required by PHP, it is generally a good practice to add $get = array(); before regardless.
Loading history...
46
47
        // CodeIgniter property aliasing
48
        if ($property === 'load') {
49
            $property = 'loader';
50
        }
51
52
        if (services()->has($property)) {
53
            $get[ $property ] = services()->get($property);
54
        } elseif (o2system()->__isset($property)) {
55
            $get[ $property ] = o2system()->__get($property);
56
        } elseif ($property === 'model') {
57
            $get[ $property ] = models('controller');
58
        } elseif ($property === 'services' || $property === 'libraries') {
59
            $get[ $property ] = services();
60
        }
61
62
        return $get[ $property ];
63
    }
64
65
    // ------------------------------------------------------------------------
66
67
    /**
68
     * Controller::view
69
     *
70
     * @param string $file
71
     * @param array  $vars
72
     */
73
    protected function view($file, array $vars = [])
74
    {
75
        view($file, $vars);
76
    }
77
}