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
Pull Request — master (#41)
by
unknown
01:21
created

Shell::addInput()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 3
nc 3
nop 2
1
<?php
2
3
namespace Spatie\WebTinker\Shell;
4
5
use Psy\Configuration;
6
use Psy\Input\SilentInput;
7
use Psy\Shell as PsyShell;
8
9
class Shell extends PsyShell
10
{
11
    /**
12
     * @var array  overwrite parent::$inputBuffer which is private
13
     */
14
    protected $inputBuffer;
15
16
    public function __construct(Configuration $config = null)
17
    {
18
        parent::__construct($config);
19
20
        $this->inputBuffer = [];
21
    }
22
23
    public function addInput($input, $silent = false)
24
    {
25
        foreach ((array) $input as $line) {
26
            $this->inputBuffer[] = $silent ? new SilentInput($line) : $line;
27
        }
28
    }
29
30
    protected function readline()
31
    {
32
        if (! empty($this->inputBuffer)) {
33
            return \array_shift($this->inputBuffer);
34
        }
35
36
        return false;
37
    }
38
}
39