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
Push — master ( 14690e...e9eac8 )
by Brent
02:11 queued 01:06
created

DTOCache   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\DataTransferObject;
4
5
use Closure;
6
7
class DTOCache
8
{
9
    private static array $cache = [];
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_ARRAY, expecting T_FUNCTION or T_CONST
Loading history...
10
11
    public static function resolve(string $class, Closure $closure): array
12
    {
13
        if (! isset(self::$cache[$class])) {
14
            self::$cache[$class] = $closure();
15
        }
16
17
        return self::$cache[$class];
18
    }
19
}
20