Completed
Pull Request — master (#39)
by
unknown
21:15 queued 20:09
created

DisjointAwarePipeline::pipe()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace League\Pipeline;
4
5
/**
6
 * Internal class used as a wrapper around pipelines within a fork.
7
 * There should be no need to use this class directly.
8
 *
9
 * Class DisjointAwarePipeline
10
 * @package League\Pipeline
11
 */
12
class DisjointAwarePipeline extends Pipeline implements DisjointAwarePipelineInterface
13
{
14
    /**
15
     * @var Fork
16
     */
17
    public $fork;
18
19
    /**
20
     * DisjointAwarePipeline constructor.
21
     * @param Fork $fork
22
     */
23
    public function __construct(Fork $fork)
24
    {
25
        parent::__construct();
26
        $this->fork = $fork;
27
    }
28
29
    /**
30
     * @inheritdoc
31
     */
32
    public function disjoin(string $tag, callable $stage = null)
33
    {
34
        return $this->fork->disjoin($tag, $stage);
35
    }
36
37
    /**
38
     * @inheritdoc
39
     */
40
    public function join(callable $resolver = null)
41
    {
42
        return $this->fork->join($resolver);
43
    }
44
45
    /**
46
     * @inheritdoc
47
     */
48
    public function pipe(callable $stage)
49
    {
50
        $this->stages[] = $stage;
51
        return $this;
52
    }
53
}
54