Application   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 39
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A run() 0 3 1
A boot() 0 5 1
A __construct() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Service\Application;
6
7
8
use Laravel\Lumen\Application as LumenApplication;
9
use Xervice\Service\Bootstrap\ApplicationBootstrapInterface;
10
11
class Application
12
{
13
    /**
14
     * @var \Laravel\Lumen\Application
15
     */
16
    private $app;
17
18
    /**
19
     * @var \Xervice\Service\Bootstrap\ApplicationBootstrapInterface
20
     */
21
    private $bootstrap;
22
23
    /**
24
     * Application constructor.
25
     *
26
     * @param \Laravel\Lumen\Application $app
27
     * @param \Xervice\Service\Bootstrap\ApplicationBootstrapInterface $bootstrap
28
     */
29
    public function __construct(
30
        LumenApplication $app,
31
        ApplicationBootstrapInterface $bootstrap
32
    ) {
33
        $this->app = $app;
34
        $this->bootstrap = $bootstrap;
35
    }
36
37
    /**
38
     * @return \Xervice\Service\Application\Application
39
     */
40
    public function boot() : Application
41
    {
42
        $this->bootstrap->boot($this->app);
43
44
        return $this;
45
    }
46
47
    public function run() : void
48
    {
49
        $this->app->run();
50
    }
51
}