ServiceProvider::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Service\Service;
6
7
8
use Illuminate\Support\ServiceProvider as LumenServiceProvider;
9
use Laravel\Lumen\Application;
10
11
class ServiceProvider implements ServiceProviderInterface
12
{
13
    /**
14
     * @var ServiceProviderInterface[]
15
     */
16
    private $serviceProvider;
17
18
    /**
19
     * ServiceProvider constructor.
20
     *
21
     * @param ServiceProviderInterface[] $serviceProvider
22
     */
23
    public function __construct(array $serviceProvider)
24
    {
25
        $this->serviceProvider = $serviceProvider;
26
    }
27
28
    /**
29
     * @param \Laravel\Lumen\Application $app
30
     */
31
    public function register(Application $app)
32
    {
33
        foreach ($this->serviceProvider as $serviceProvider) {
34
            $serviceProvider->register($app);
35
        }
36
    }
37
38
}