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.

ApiBuildCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 28
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A configure() 0 7 1
A execute() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the "php-ipfs" package.
7
 *
8
 * (c) Robert Schönthal <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace IPFS\Console;
15
16
use Symfony\Component\Console\Command\Command;
17
use Symfony\Component\Console\Input\InputInterface;
18
use Symfony\Component\Console\Output\OutputInterface;
19
20
class ApiBuildCommand extends Command
21
{
22
    /**
23
     * @var \Closure
24
     */
25
    private $builder;
26
27 3
    public function __construct(\Closure $builder)
28
    {
29 3
        parent::__construct(null);
30 3
        $this->builder = $builder;
31 3
    }
32
33 3
    protected function configure()
34
    {
35
        $this
36 3
            ->setName('rebuild')
37 3
            ->setDescription('rebuild api classes by parsing the official api doc')
38
        ;
39 3
    }
40
41 1
    protected function execute(InputInterface $input, OutputInterface $output)
42
    {
43 1
        $this->builder->__invoke()->build();
44
45 1
        $output->writeln('updated Api Classes in <info>src/Api</info>');
46 1
    }
47
}
48