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.
Test Failed
Push — master ( 09a43c...4f79d5 )
by Anton
03:00
created

DiceCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Console;
9
10
use Symfony\Component\Console\Command\Command;
11
use Symfony\Component\Console\Input\InputArgument;
12
use Symfony\Component\Console\Input\InputInterface as Input;
13
use Symfony\Component\Console\Output\OutputInterface as Output;
14
15
class DiceCommand extends Command
16
{
17
    private $deployer;
18
19 6
    public function __construct()
20
    {
21 6
        parent::__construct('roll:dice');
22 6
        $this->setDescription('Roll any number of dice');
23 6
    }
24
25 6
    protected function configure()
26
    {
27 6
        $this->addArgument('number', InputArgument::OPTIONAL, 'Number of dice', 2);
28 6
    }
29
30
    protected function execute(Input $input, Output $output)
31
    {
32
        $number = intval($input->getArgument('number'));
33
        while ($number-- > 0) {
34
            $output->write(["⚀", "⚁", "⚂", "⚃", "⚄", "⚅"][rand(0, 5)]);
35
        }
36
        $output->write("\n");
37
        return 0;
38
    }
39
}
40