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.

ServerRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 37
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLanguage() 0 3 1
A getController() 0 7 2
1
<?php
2
/**
3
 * This file is part of the O2System Reactor 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\Reactor\Http\Message;
15
16
// ------------------------------------------------------------------------
17
18
use O2System\Kernel\Http\Message;
19
use O2System\Kernel\Http\Router\DataStructures\Controller;
20
21
/**
22
 * Class ServerRequest
23
 *
24
 * @package O2System\Reactor\Http\Message
25
 */
26
class ServerRequest extends Message\ServerRequest implements \IteratorAggregate
27
{
28
    /**
29
     * Request::$controller
30
     *
31
     * Requested Controller FilePath
32
     *
33
     * @var string Controller FilePath.
34
     */
35
    protected $controller;
36
37
    // ------------------------------------------------------------------------
38
39
    /**
40
     * Request::getLanguage
41
     *
42
     * @return string
43
     */
44
    public function getLanguage()
45
    {
46
        return language()->getDefault();
47
    }
48
49
    //--------------------------------------------------------------------
50
51
    /**
52
     * Request::getController
53
     *
54
     * @return bool|Controller
55
     */
56
    public function getController()
57
    {
58
        if (false !== ($controller = services('controller'))) {
59
            return $controller;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $controller also could return the type O2System\Kernel\Containers\Services which is incompatible with the documented return type O2System\Kernel\Http\Rou...ures\Controller|boolean.
Loading history...
60
        }
61
62
        return false;
63
    }
64
}