Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | trait TransportObserve |
||
15 | { |
||
16 | /** |
||
17 | * @var Closure[] |
||
18 | */ |
||
19 | private $tpOpening = []; |
||
20 | |||
21 | /** |
||
22 | * @var Closure[] |
||
23 | */ |
||
24 | private $tpClosed = []; |
||
25 | |||
26 | /** |
||
27 | * @param Closure $opening |
||
28 | * @param Closure $closed |
||
29 | */ |
||
30 | public function transportable(Closure $opening, Closure $closed) : void |
||
31 | { |
||
32 | $this->tpOpening[] = $opening; |
||
33 | $this->tpClosed[] = $closed; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param Transport $transport |
||
38 | */ |
||
39 | protected function changed(Transport $transport = null) : void |
||
48 | ; |
||
49 | } |
||
51 |