Passed
Push — master ( a14261...5f8bab )
by Gabor
05:22
created

ServiceAdapter::addModulePipeLine()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 7.1
6
 *
7
 * @copyright 2012 - 2017 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
declare(strict_types = 1);
13
14
namespace WebHemi\MiddlewarePipeline\ServiceAdapter\Base;
15
16
use WebHemi\Middleware\Common;
17
use WebHemi\MiddlewarePipeline\ServiceAdapter\AbstractAdapter;
18
19
/**
20
 * Class ServiceAdapter.
21
 */
22
class ServiceAdapter extends AbstractAdapter
23
{
24
    /**
25
     * Initialize the listing properties (priorityList, pipelineList, keyMiddlewareList).
26
     *
27
     * @return void
28
     */
29 11
    protected function initProperties() : void
30
    {
31 11
        $this->keyMiddlewareList = [
32
            Common\RoutingMiddleware::class,
33
            Common\DispatcherMiddleware::class,
34
            Common\FinalMiddleware::class
35
        ];
36
37
        // The FinalMiddleware should not be part of the queue.
38 11
        $this->priorityList = [
39
            0   => [Common\RoutingMiddleware::class],
40
            100 => [Common\DispatcherMiddleware::class]
41
        ];
42
43 11
        $this->pipelineList = [
44
            Common\RoutingMiddleware::class,
45
            Common\DispatcherMiddleware::class,
46
        ];
47 11
    }
48
}
49