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.

Webhook   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 10 1
A execute() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Teebot\Command\Listener;
6
7
use Symfony\Component\Console\Input\{
8
    InputArgument,
9
    InputInterface
10
};
11
use Symfony\Component\Console\Output\OutputInterface;
12
use Teebot\{
13
    Client,
14
    Command\AbstractCommand
15
};
16
17
class Webhook extends AbstractCommand
18
{
19
    /**
20
     * Configures the command
21
     */
22
    public function configure()
23
    {
24
        $this
25
            ->setName('listener:webhook')
26
            ->setDescription('Executes bot in webhook mode')
27
            ->setHelp('Executes bot in webhook mode')
28
            ->addArgument(
29
                'path',
30
                InputArgument::REQUIRED,
31
                'Path to bot directory'
32
            );
33
    }
34
35
    /**
36
     * Executes the command
37
     *
38
     * @param InputInterface  $input
39
     * @param OutputInterface $output
40
     */
41
    protected function execute(InputInterface $input, OutputInterface $output)
42
    {
43
        parent::execute($input, $output);
44
45
        $client = new Client($this->config);
46
        $client->webhook();
47
    }
48
}