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 ( 08ea9d...7729c5 )
by Freek
02:30
created

InvalidInput::getResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace Spatie\SlashCommand\Exceptions;
4
5
use Exception;
6
use Spatie\SlashCommand\Attachment;
7
use Spatie\SlashCommand\Request;
8
use Spatie\SlashCommand\Response;
9
use Spatie\SlashCommand\Handlers\SignatureHandler;
10
11
class InvalidInput extends SlashException
12
{
13
    protected $handler;
14
15
    public function __construct($message, SignatureHandler $handler, Exception $previous = null)
16
    {
17
        parent::__construct($message, 0, $previous);
18
19
        $this->handler = $handler;
20
    }
21
22
    public function getResponse(Request $request): Response
23
    {
24
        return parent::getResponse($request)
25
            ->withAttachment(
26
                Attachment::create()
27
                    ->setText($this->handler->getHelpDescription())
28
            );
29
    }
30
}
31