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 ( 5428db...63ac40 )
by Freek
02:17
created

SlashCommandResponseJob::respondToSlack()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Spatie\SlashCommand\Jobs;
4
5
use Illuminate\Contracts\Queue\ShouldQueue;
6
use Spatie\SlashCommand\HandlesSlashCommand;
7
use Spatie\SlashCommand\SlashCommandData;
8
use Spatie\SlashCommand\SlashCommandResponse;
9
10
 abstract class SlashCommandResponseJob implements ShouldQueue, HandlesSlashCommand
11
{
12
    /** @var \Spatie\SlashCommand\SlashCommandData */
13
    public $slashCommandData;
14
15
    public function getSlashCommandResponse(): SlashCommandResponse
16
    {
17
        return SlashCommandResponse::create($this->slashCommandData);
18
    }
19
     
20
     public function setSlashCommandResponse(SlashCommandData $slashCommandData)
21
     {
22
         $this->slashCommandData = $slashCommandData;
23
24
         return $this;
25
     }
26
27
    public function respondToSlack(string $text): SlashCommandResponse
28
    {
29
        return $this->getSlashCommandResponse()->setText($text);
30
    }
31
32
     public function getSlashCommandData(): SlashCommandData
33
     {
34
         return $this->slashCommandData;
35
     }
36
37
    abstract public function handle();
38
 }
39