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.
Passed
Push — master ( 1dba41...0db4d1 )
by Anton
02:05
created

VerbosityString::__toString()   B

Complexity

Conditions 6
Paths 6

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 6

Importance

Changes 0
Metric Value
cc 6
nc 6
nop 0
dl 0
loc 20
ccs 12
cts 12
cp 1
crap 6
rs 8.9777
c 0
b 0
f 0
1
<?php declare(strict_types=1);
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 10
    public function __construct(OutputInterface $output)
20
    {
21 10
        $this->output = $output;
22 10
    }
23
24 10
    public function __toString(): string
25
    {
26 10
        switch ($this->output->getVerbosity()) {
27 10
            case OutputInterface::VERBOSITY_VERBOSE:
28 1
                return '-v';
29
30 9
            case OutputInterface::VERBOSITY_VERY_VERBOSE:
31 1
                return '-vv';
32
33 8
            case OutputInterface::VERBOSITY_DEBUG:
34 4
                return '-vvv';
35
36 4
            case OutputInterface::VERBOSITY_QUIET:
37 1
                return '-q';
38
39 3
            case OutputInterface::VERBOSITY_NORMAL:
40
            default:
41 3
                return '';
42
        }
43
    }
44
}
45