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.

BucketsCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
A __construct() 0 5 1
A execute() 0 8 2
1
<?php
2
3
namespace Fieg\StatisticoBundle\Command;
4
5
use Fieg\Statistico\Reader;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class BucketsCommand extends Command
11
{
12
    /**
13
     * @var Reader
14
     */
15
    private $reader;
16
17
    protected function configure()
18
    {
19
        $this
20
            ->setName('statistico:buckets')
21
       ;
22
    }
23
24
    /**
25
     * @param Reader $reader
26
     */
27
    public function __construct(Reader $reader)
28
    {
29
        $this->reader = $reader;
30
        parent::__construct();
31
    }
32
33
    protected function execute(InputInterface $input, OutputInterface $output)
34
    {
35
        $buckets = $this->reader->getBuckets();
36
37
        foreach ($buckets as $bucket) {
38
            $output->writeln(sprintf('<info>%s</info>', $bucket));
39
        }
40
    }
41
}
42