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
Pull Request — master (#19)
by Barry vd.
02:30
created

InvalidInput::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
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())
0 ignored issues
show
Bug introduced by
The method getHelpDescription() does not seem to exist on object<Spatie\SlashComma...dlers\SignatureHandler>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
28
            );
29
    }
30
}
31