InvokeHandlerTerminator::terminate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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