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.
Completed
Push — master ( 99078a...9605c1 )
by Oanh
02:49
created

VerbosityString::__toString()   B

Complexity

Conditions 6
Paths 6

Size

Total Lines 29
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 19
CRAP Score 6.031
Metric Value
dl 0
loc 29
ccs 19
cts 21
cp 0.9048
rs 8.439
cc 6
eloc 20
nc 6
nop 0
crap 6.031
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\Output;
9
10
use Symfony\Component\Console\Output\OutputInterface;
11
12
class VerbosityString
13
{
14
    /**
15
     * @var OutputInterface
16
     */
17
    private $output;
18
19
    /**
20
     * @param OutputInterface $output
21
     */
22 7
    public function __construct(OutputInterface $output)
23
    {
24 7
        $this->output = $output;
25 7
    }
26
27
    /**
28
     * @return string
29
     */
30 7
    public function __toString()
31
    {
32 7
        switch ($this->output->getVerbosity()) {
33 7
            case OutputInterface::VERBOSITY_NORMAL:
34 3
                $verbosity = '';
35 3
                break;
36
37 4
            case OutputInterface::VERBOSITY_VERBOSE:
38 1
                $verbosity = '-v';
39 1
                break;
40
41 3
            case OutputInterface::VERBOSITY_VERY_VERBOSE:
42 1
                $verbosity = '-vv';
43 1
                break;
44
45 2
            case OutputInterface::VERBOSITY_DEBUG:
46 1
                $verbosity = '-vvv';
47 1
                break;
48
49 1
            case OutputInterface::VERBOSITY_QUIET:
50 1
                $verbosity = '-q';
51 1
                break;
52
53
            default:
54
                $verbosity = '';
55 7
        }
56
57 7
        return $verbosity;
58
    }
59
}
60