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 Casper
01:49 queued 29s
created

Command::optionsWithArguments()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
rs 9.4285
c 1
b 0
f 0
cc 2
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Spatie\PhpUnitWatcher\PhpUnit;
4
5
use PHPUnit\TextUI\Command as PhpUnitCommand;
6
7
class Command extends PhpUnitCommand
8
{
9
    public static function options()
10
    {
11
        $options = array_keys((new static)->longOptions);
12
13
        return self::removeEqualSigns($options);
14
    }
15
16
    public static function optionsWithArguments()
17
    {
18
        $options = array_keys((new static)->longOptions);
19
20
        return self::removeEqualSigns(array_filter($options, function ($option) {
21
            return substr($option, -1) == '=' && substr($option, -2) != '==';
22
        }));
23
    }
24
25
    private static function removeEqualSigns($options)
26
    {
27
        return array_map(function ($option) {
28
            return str_replace('=', '', $option);
29
        }, $options);
30
    }
31
}
32