InvokeHandlerTerminator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 30
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A terminate() 0 5 1
A getStageContextClass() 0 4 1
A getNextStageContextClass() 0 4 1
1
<?php
2
namespace PSB\Core\Pipeline\Incoming;
3
4
5
use PSB\Core\Pipeline\Incoming\StageContext\InvokeHandlerContext;
6
use PSB\Core\Pipeline\PipelineTerminator;
7
8
class InvokeHandlerTerminator extends PipelineTerminator
9
{
10
11
    /**
12
     * @param InvokeHandlerContext $context
13
     *
14
     * @return void
15
     */
16 2
    protected function terminate($context)
17
    {
18 2
        $handler = $context->getMessageHandler();
19 2
        $handler->handle($context->getMessageBeingHandled(), $context);
20 2
    }
21
22
    /**
23
     * @return string
24
     */
25 1
    public static function getStageContextClass()
26
    {
27 1
        return InvokeHandlerContext::class;
28
    }
29
30
    /**
31
     * @return string
32
     */
33 1
    public static function getNextStageContextClass()
34
    {
35 1
        return '';
36
    }
37
}
38