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.

ComposerIOHandler::in()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
namespace Dbtlr\PHPEnvBuilder\IOHandler;
3
4
use Composer\IO\IOInterface;
5
6
class ComposerIOHandler implements IOHandlerInterface
7
{
8
    /** @var IOInterface */
9
    protected $bus;
10
11
    /**
12
     * ComposerIOHandler constructor.
13
     *
14
     * @param IOInterface $bus
15
     */
16 18
    public function __construct(IOInterface $bus)
17
    {
18 18
        $this->bus = $bus;
19 18
    }
20
21
    /**
22
     * Output a message to the console.
23
     *
24
     * @param string $message
25
     */
26 2
    public function out(string $message)
27
    {
28 2
        $this->bus->write($message);
29 2
    }
30
31
    /**
32
     * Get input from the console.
33
     *
34
     * @param string $question
35
     * @param string $default
36
     * @return mixed
37
     */
38 2
    public function in(string $question, string $default = '')
39
    {
40 2
        return $this->bus->ask($question, $default);
41
    }
42
}
43