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 ( 222b88...033c06 )
by Baptiste
02:34
created

InjectionStrategies::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\InjectionStrategy\SetterStrategy;
7
use Innmind\Reflection\InjectionStrategy\NamedMethodStrategy;
8
use Innmind\Reflection\InjectionStrategy\ReflectionStrategy;
9
use Innmind\Immutable\TypedCollection;
10
11
final class InjectionStrategies
12
{
13
    private static $defaults;
14
15
    /**
16
     * Return a collection of the default strategies available
17
     *
18
     * @return TypedCollection
19
     */
20 13
    public static function defaults(): TypedCollection
21
    {
22 13
        if (self::$defaults !== null) {
23 13
            return self::$defaults;
24
        }
25
26 1
        self::$defaults = new TypedCollection(
27 1
            InjectionStrategyInterface::class,
28
            [
29 1
                new SetterStrategy,
30 1
                new NamedMethodStrategy,
31 1
                new ReflectionStrategy,
32
            ]
33
        );
34
35 1
        return self::$defaults;
36
    }
37
}
38