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 ( 636f6e...ab1dd8 )
by Drew
04:13
created

ComposerIOHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A out() 0 4 1
A in() 0 4 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
    public function __construct(IOInterface $bus)
17
    {
18
        $this->bus = $bus;
19
    }
20
21
    /**
22
     * Output a message to the console.
23
     *
24
     * @param string $message
25
     */
26
    public function out(string $message)
27
    {
28
        $this->bus->write($message);
29
    }
30
31
    /**
32
     * Get input from the console.
33
     *
34
     * @param string $question
35
     * @param string $default
36
     * @return mixed
37
     */
38
    public function in(string $question, string $default = '')
39
    {
40
        return $this->bus->ask($question, $default);
41
    }
42
}
43