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 (#44)
by Tom
01:09
created

Enum::resolveFromStaticMethods()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
namespace Spatie\Enum\Laravel;
4
5
use Illuminate\Contracts\Database\Eloquent\Castable;
6
use ReflectionClass;
7
use Spatie\Enum\Enum as BaseEnum;
8
9
abstract class Enum extends BaseEnum
10
{
11
    protected static function resolveFromStaticMethods(ReflectionClass $reflection): array
12
    {
13
        $values = parent::resolveFromStaticMethods($reflection);
14
15
        if (array_key_exists(Castable::class, class_implements(static::class))) {
16
            unset($values[array_search('castUsing', $values)]);
17
        }
18
19
        return $values;
20
    }
21
}
22