ServiceFacade   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 18.18%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 29
ccs 2
cts 11
cp 0.1818
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A registerHandler() 0 4 1
A isDebug() 0 3 1
A startApplication() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Service;
6
7
8
use Xervice\Core\Facade\AbstractFacade;
9
10
/**
11
 * @method \Xervice\Service\ServiceFactory getFactory()
12
 * @method \Xervice\Service\ServiceConfig getConfig()
13
 */
14
class ServiceFacade extends AbstractFacade
15
{
16
    /**
17
     * Boot and run the application
18
     *
19
     * @api
20
     */
21
    public function startApplication()
22
    {
23
        $this->getFactory()->createApplication()
24
             ->boot()
25
             ->run();
26
    }
27
28
    /**
29
     */
30
    public function registerHandler()
31
    {
32
        $this->getFactory()->createHandlerProvider()->handle(
33
            $this->getConfig()->isDebug()
34
        );
35
    }
36
37
    /**
38
     * @return bool
39
     */
40 1
    public function isDebug()
41
    {
42 1
        return $this->getConfig()->isDebug();
43
    }
44
}