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

DisjointAwarePipeline   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 2
dl 0
loc 42
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A disjoin() 0 4 1
A join() 0 4 1
A pipe() 0 5 1
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