Passed
Push — master ( 6f4616...466e1a )
by Mike
02:15
created

WebFacade   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 27.27%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 33
ccs 3
cts 11
cp 0.2727
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
A initWebRouting() 0 3 1
A executeRequest() 0 3 1
A executeUrl() 0 3 1
1
<?php
2
3
4
namespace Xervice\Web;
5
6
7
use Symfony\Component\HttpFoundation\Request;
8
use Xervice\Core\Facade\AbstractFacade;
9
10
/**
11
 * @method \Xervice\Web\WebFactory getFactory()
12
 */
13
class WebFacade extends AbstractFacade
14
{
15
    public function initWebRouting(): void
16
    {
17
        $this->getFactory()->createRouteProvider()->provideRoutings();
18
    }
19
20
    /**
21
     * @param string $url
22
     *
23
     * @throws \Xervice\Web\Business\Exception\WebExeption
24
     */
25 2
    public function executeUrl(string $url): void
26
    {
27 2
        $this->getFactory()->createExecutionProvider()->executeUrl($url);
28 2
    }
29
30
    /**
31
     * @param \Symfony\Component\HttpFoundation\Request $request
32
     *
33
     * @throws \Xervice\Web\Business\Exception\WebExeption
34
     */
35
    public function executeRequest(Request $request): void
36
    {
37
        $this->getFactory()->createExecutionProvider()->executeRequest($request);
38
    }
39
40
    /**
41
     * @throws \Xervice\Web\Business\Exception\WebExeption
42
     */
43
    public function execute(): void
44
    {
45
        $this->getFactory()->createExecutionProvider()->execute();
46
    }
47
}