Passed
Push — setup-uses-abstract-parent-met... ( cefcd8 )
by Chema
03:44
created

AbstractSetupGacela   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 34
ccs 8
cts 8
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A externalServices() 0 3 1
A buildSuffixTypes() 0 3 1
A buildConfig() 0 3 1
A buildMappingInterfaces() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Framework\Bootstrap;
6
7
use Gacela\Framework\Config\GacelaConfigBuilder\ConfigBuilder;
8
use Gacela\Framework\Config\GacelaConfigBuilder\MappingInterfacesBuilder;
9
use Gacela\Framework\Config\GacelaConfigBuilder\SuffixTypesBuilder;
10
11
abstract class AbstractSetupGacela implements SetupGacelaInterface
12
{
13
    /**
14
     * Define different config sources.
15
     */
16 62
    public function buildConfig(ConfigBuilder $builder): ConfigBuilder
17
    {
18 62
        return $builder;
19
    }
20
21
    /**
22
     * Define the mapping between interfaces and concretions, so Gacela services will auto-resolve them automatically.
23
     *
24
     * @param array<string, class-string|object|callable> $externalServices
1 ignored issue
show
Documentation Bug introduced by
The doc comment array<string, class-string|object|callable> at position 4 could not be parsed: Unknown type name 'class-string' at position 4 in array<string, class-string|object|callable>.
Loading history...
25
     */
26 62
    public function buildMappingInterfaces(MappingInterfacesBuilder $builder, array $externalServices): MappingInterfacesBuilder
27
    {
28 62
        return $builder;
29
    }
30
31
    /**
32
     * Allow overriding gacela resolvable types.
33
     */
34 62
    public function buildSuffixTypes(SuffixTypesBuilder $builder): SuffixTypesBuilder
35
    {
36 62
        return $builder;
37
    }
38
39
    /**
40
     * @return array<string, class-string|object|callable>
1 ignored issue
show
Documentation Bug introduced by
The doc comment array<string, class-string|object|callable> at position 4 could not be parsed: Unknown type name 'class-string' at position 4 in array<string, class-string|object|callable>.
Loading history...
41
     */
42 26
    public function externalServices(): array
43
    {
44 26
        return [];
45
    }
46
}
47