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

AbstractConfigGacela::__construct()   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
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
ccs 2
cts 2
cp 1
crap 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