Completed
Pull Request — master (#40)
by
unknown
24:33
created

DisjointPipelineBuilder::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 2
eloc 3
nc 2
nop 2
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