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 — develop ( fb2cf2...a0a09f )
by Baptiste
02:11
created

ExtractionStrategies::defaults()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 17
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 2
Metric Value
dl 0
loc 17
ccs 9
cts 9
cp 1
rs 9.4285
cc 2
eloc 9
nc 2
nop 0
crap 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Reflection;
5
6
use Innmind\Reflection\ExtractionStrategy\GetterStrategy;
7
use Innmind\Reflection\ExtractionStrategy\NamedMethodStrategy;
8
use Innmind\Reflection\ExtractionStrategy\ReflectionStrategy;
9
use Innmind\Immutable\TypedCollection;
10
use Innmind\Immutable\TypedCollectionInterface;
11
12
final class ExtractionStrategies
13
{
14
    private static $defaults;
15
16
    /**
17
     * Return a collection of the default strategies available
18
     *
19
     * @return TypedCollectionInterface
20
     */
21 13
    public static function defaults(): TypedCollectionInterface
22
    {
23 13
        if (self::$defaults !== null) {
24 13
            return self::$defaults;
25
        }
26
27 1
        self::$defaults = new TypedCollection(
28 1
            ExtractionStrategyInterface::class,
29
            [
30 1
                new GetterStrategy,
31 1
                new NamedMethodStrategy,
32 1
                new ReflectionStrategy,
33
            ]
34
        );
35
36 1
        return self::$defaults;
37
    }
38
}
39