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.

ListServers   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 37
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
A execute() 0 13 1
1
<?php
2
namespace SeleniumSetup\Controller;
3
4
use SeleniumSetup\Config\ConfigFactory;
5
use SeleniumSetup\Environment;
6
use SeleniumSetup\Locker\Locker;
7
use SeleniumSetup\Locker\ServerItem;
8
use SeleniumSetup\Service\ListServersService;
9
use Symfony\Component\Console\Command\Command;
10
use Symfony\Component\Console\Input\InputInterface;
11
use Symfony\Component\Console\Output\OutputInterface;
12
13
class ListServers extends Command
14
{
15
    /**
16
     * Configure the command options.
17
     *
18
     * @return void
19
     */
20
    protected function configure()
21
    {
22
        $this
23
            ->setName('servers')
24
            ->setDescription('List registered Selenium Servers.');
25
    }
26
27
    /**
28
     * Execute the command.
29
     * @todo Decide if this can be isolated into a service. 
30
     *
31
     * @param  \Symfony\Component\Console\Input\InputInterface  $input
32
     * @param  \Symfony\Component\Console\Output\OutputInterface  $output
33
     * @return void
34
     */
35
    public function execute(InputInterface $input, OutputInterface $output)
36
    {
37
        // Prepare.
38
        $locker = new Locker();
39
        $locker->openLockFile();
40
        
41
        // View.
42
        $table = $this->getHelper('table');
43
        $table
44
            ->setHeaders(ServerItem::getAllProperties())
45
            ->setRows($locker->toArray());
46
        $table->render($output);
47
    }
48
49
}