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 ( 807941...300eda )
by Brent
20s queued 12s
created

DTOCache::resolve()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 2
1
<?php
2
3
namespace Spatie\DataTransferObject;
4
5
use Closure;
6
7
class DTOCache
8
{
9
    /** @var array */
10
    private static $cache = [];
11
12
    public static function resolve(string $class, Closure $closure): array
13
    {
14
        if (! isset(self::$cache[$class])) {
15
            self::$cache[$class] = $closure();
16
        }
17
18
        return self::$cache[$class];
19
    }
20
}
21