Passed
Pull Request — master (#54)
by Jesús
02:44
created

AbstractConfigGacela   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 25
rs 10
c 1
b 0
f 0
ccs 9
cts 9
cp 1
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A mappingInterfaces() 0 3 1
A config() 0 3 1
A getGlobalService() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Framework;
6
7
abstract class AbstractConfigGacela
8
{
9
    private array $globalServices;
10
11 4
    public function __construct(array $globalServices = [])
12
    {
13 4
        $this->globalServices = $globalServices;
14 4
    }
15
16
    /**
17
     * @return mixed
18
     */
19 1
    protected function getGlobalService(string $key)
20
    {
21 1
        return $this->globalServices[$key] ?? null;
22
    }
23
24 1
    public function config(): array
25
    {
26 1
        return [];
27
    }
28
29 3
    public function mappingInterfaces(): array
30
    {
31 3
        return [];
32
    }
33
}
34