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.

Any::scan()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
ccs 9
cts 9
cp 1
crap 2
1
<?php
2
namespace GetSky\ParserExpressions\Rules;
3
4
use GetSky\ParserExpressions\Context;
5
use GetSky\ParserExpressions\Result;
6
use GetSky\ParserExpressions\RuleInterface;
7
8
/**
9
 * It rule consumes any character in the string.
10
 *
11
 * @package GetSky\ParserExpressions\Rules
12
 * @author  Alexander Getmanskii <[email protected]>
13
 */
14
class Any implements RuleInterface
15
{
16
17
    protected $name = 'ANY';
18
19
    /**
20
     * {@inheritdoc}
21
     */
22 1
    public function scan(Context $context)
23
    {
24 1
        $index = $context->getCursor();
25 1
        $value = $context->value();
26
27 1
        if ($value === false) {
28 1
            $context->error($this, $index);
29 1
            return false;
30
        }
31
32 1
        $result = new Result($this->name);
33 1
        $result->setValue($value, $index);
34
35 1
        return $result;
36
    }
37
}
38