Passed
Push — rename-mapping-to-bindings ( 2a1c78 )
by Chema
03:32
created

AbstractSetupGacela::buildMappingInterfaces()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Framework\Bootstrap;
6
7
use Gacela\Framework\Config\GacelaConfigBuilder\BindingsBuilder;
8
use Gacela\Framework\Config\GacelaConfigBuilder\ConfigBuilder;
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 buildBindings(BindingsBuilder $builder, array $externalServices): BindingsBuilder
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 27
    public function externalServices(): array
43
    {
44 27
        return [];
45
    }
46
}
47