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.
Completed
Push — master ( 276e3f...f1cc60 )
by Andreas
01:50
created

UserErrorPageHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 29
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 10 2
1
<?php
2
/**
3
 * Starlit App.
4
 *
5
 * @copyright Copyright (c) 2016 Starweb AB
6
 * @license   BSD 3-Clause
7
 */
8
9
namespace Starlit\App\ErrorHandling;
10
11
use Whoops\Handler\Handler;
12
13
/**
14
 * @author Andreas Nilsson <http://github.com/jandreasn>
15
 */
16
class UserErrorPageHandler extends Handler
17
{
18
    /**
19
     * @var string
20
     */
21
    protected $errorPagePath;
22
23
    /**
24
     * @param string $errorPagePath
25
     */
26
    public function __construct($errorPagePath)
27
    {
28
        $this->errorPagePath = $errorPagePath;
29
    }
30
31
    /**
32
     * @return int|null
33
     */
34
    public function handle()
35
    {
36
        if (php_sapi_name() === 'cli') {
37
            return Handler::DONE;
38
        }
39
40
        include $this->errorPagePath;
41
42
        return Handler::QUIT;
43
    }
44
}
45