ProcessesWithPipelines   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 2
cbo 0
dl 0
loc 36
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addInboundPipelineStage() 0 4 1
A addOutboundPipelineStage() 0 4 1
1
<?php
2
3
namespace Afonso\Soapi;
4
5
use League\Pipeline\Pipeline;
6
use League\Pipeline\StageInterface;
7
8
trait ProcessesWithPipelines
9
{
10
    /**
11
     * The inbound pipeline.
12
     *
13
     * @var \League\Pipeline\Pipeline
14
     */
15
    protected $inboundPipeline;
16
17
    /**
18
     * The outbound pipeline.
19
     *
20
     * @var \League\Pipeline\Pipeline
21
     */
22
    protected $outboundPipeline;
23
24
    /**
25
     * Adds a new stage to the inbound pipeline.
26
     *
27
     * @param   \League\Pipeline\StageInterface  $stage
28
     */
29
    public function addInboundPipelineStage(StageInterface $stage)
30
    {
31
        $this->inboundPipeline = $this->inboundPipeline->pipe($stage);
32
    }
33
34
    /**
35
     * Adds a new stage to the outbound pipeline.
36
     *
37
     * @param   \League\Pipeline\StageInterface  $stage
38
     */
39
    public function addOutboundPipelineStage(StageInterface $stage)
40
    {
41
        $this->outboundPipeline = $this->outboundPipeline->pipe($stage);
42
    }
43
}
44