Completed
Pull Request — master (#40)
by
unknown
24:33
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
 * Created by PhpStorm.
4
 * User: juzerali
5
 * Date: 09/01/18
6
 * Time: 6:52 PM
7
 */
8
9
namespace League\Pipeline;
10
11
12
class DisjointPipelineBuilder extends PipelineBuilder implements DisjointPipelineBuilderInterface
13
{
14
    private $parent;
15
16
    public function __construct(ForkBuilder $parent, callable $stage = null)
17
    {
18
        if($stage != null) $this->stages[] = $stage;
19
        $this->parent = $parent;
20
    }
21
22
    public function disjoin(string $tag, callable $stage = null)
23
    {
24
        return $this->parent->disjoin($tag, $stage);
25
    }
26
27
    public function join()
28
    {
29
        return $this->parent->join();
30
    }
31
}
32