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   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 27
ccs 9
cts 9
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaults() 0 17 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