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 ( 86dce3...98cf71 )
by Nur
02:40
created

Error   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 18 4
1
<?php
2
/**
3
 * This file is part of the O2System PHP 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\Reactor\Http\Controllers;
15
16
// ------------------------------------------------------------------------
17
18
use O2System\Reactor\Http\Controller;
19
20
/**
21
 * Class Error
22
 *
23
 * @package O2System\Reactor\Http\Controllers
24
 */
25
class Error extends Controller
26
{
27
    /**
28
     * Error::index
29
     *
30
     * @param int $code
31
     */
32
    public function index($code = 500)
33
    {
34
        $codeString = $code . '_' . error_code_string($code);
35
36
        if (presenter()->theme->use === true) {
0 ignored issues
show
Bug introduced by
The function presenter was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

36
        if (/** @scrutinizer ignore-call */ presenter()->theme->use === true) {
Loading history...
37
            presenter()->theme->setLayout('error');
38
39
            if (false !== ($layout = presenter()->theme->active->getLayout())) {
40
                if ($layout->getFilename() === 'theme') {
41
                    presenter()->theme->set(false);
42
                }
43
            }
44
        }
45
46
        view('error-code', [
0 ignored issues
show
Bug introduced by
The function view was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

46
        /** @scrutinizer ignore-call */ 
47
        view('error-code', [
Loading history...
47
            'code'    => $code,
48
            'title'   => language()->getLine($codeString . '_TITLE'),
49
            'message' => language()->getLine($codeString . '_MESSAGE'),
50
        ]);
51
    }
52
}