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.

UserErrorPageHandler   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
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 23
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 declare(strict_types=1);
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
class UserErrorPageHandler extends Handler
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $errorPagePath;
19
20
    public function __construct(string $errorPagePath)
21
    {
22
        $this->errorPagePath = $errorPagePath;
23
    }
24
25
    public function handle(): ?int
26
    {
27
        if (php_sapi_name() === 'cli') {
28
            return Handler::DONE;
29
        }
30
31
        include $this->errorPagePath;
32
33
        return Handler::QUIT;
34
    }
35
}
36