Completed
Pull Request — master (#40)
by
unknown
21:56
created

DisjointPipelineBuilder   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 20
c 0
b 0
f 0
wmc 4
lcom 1
cbo 2
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
A disjoin() 0 4 1
A join() 0 4 1
1
<?php
2
3
namespace League\Pipeline;
4
5
6
class DisjointPipelineBuilder extends PipelineBuilder implements DisjointPipelineBuilderInterface
7
{
8
    private $parent;
9
10
    public function __construct(ForkBuilder $parent, callable $stage = null)
11
    {
12
        if($stage != null) $this->stages[] = $stage;
13
        $this->parent = $parent;
14
    }
15
16
    public function disjoin(string $tag, callable $stage = null)
17
    {
18
        return $this->parent->disjoin($tag, $stage);
19
    }
20
21
    public function join()
22
    {
23
        return $this->parent->join();
24
    }
25
}
26