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 ( b62982...d1158c )
by Freek
02:01
created

BaseHandler::canHandle()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
nc 1
1
<?php
2
3
namespace Spatie\SlashCommand\SlashCommandHandler;
4
5
use Spatie\SlashCommand\SlashCommandRequest;
6
use Spatie\SlashCommand\SlashCommandResponse;
7
8
abstract class BaseHandler
9
{
10
    /** @var \Spatie\SlashCommand\SlashCommandRequest */
11
    protected $request;
12
13
    public function __construct(SlashCommandRequest $request)
14
    {
15
        $this->request = $request;
16
    }
17
18
    abstract public function handle(SlashCommandRequest $slashCommandRequest): SlashCommandResponse;
19
20
    abstract public function canHandle(SlashCommandRequest $slashCommandRequest): bool;
21
22
    public function respond(string $text): SlashCommandResponse
23
    {
24
        return SlashCommandResponse::createForRequest($this->request)->setText($text);
25
    }
26
}
27