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.

RequiredInput::requiredSecret()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 11
rs 10
cc 2
nc 2
nop 2
1
<?php
2
3
namespace Honeybadger\HoneybadgerLaravel\Concerns;
4
5
trait RequiredInput
6
{
7
    /**
8
     * Prompts for a required secret until its given.
9
     *
10
     * @param  string  $question
11
     * @param  string  $failedMessage
12
     * @return string
13
     */
14
    public function requiredSecret($question, $failedMessage)
15
    {
16
        $input = $this->secret($question);
17
18
        if (is_null($input)) {
19
            $this->error($failedMessage);
20
21
            return $this->requiredSecret($question, $failedMessage);
22
        }
23
24
        return $input;
25
    }
26
27
    abstract public function secret($message, $fallback = true);
28
29
    abstract public function error($message, $verbosity = null);
30
}
31