1 | <?php declare(strict_types=1); |
||
30 | final class IfBlock implements IfExpressionInterface |
||
31 | { |
||
32 | use CheckCallableTrait; |
||
33 | |||
34 | /** |
||
35 | * @var callable |
||
36 | */ |
||
37 | private $condition; |
||
38 | |||
39 | /** |
||
40 | * @var ExecutionBlockInterface |
||
41 | */ |
||
42 | private $onTrue; |
||
43 | |||
44 | /** |
||
45 | * @var ExecutionBlockInterface |
||
46 | */ |
||
47 | private $onFalse; |
||
48 | |||
49 | /** |
||
50 | * @var array |
||
51 | */ |
||
52 | private $properties; |
||
53 | |||
54 | /** |
||
55 | * @param callable $condition |
||
56 | * @param ExecutionBlockInterface $onTrue |
||
57 | * @param ExecutionBlockInterface $onFalse |
||
58 | * @param array $properties |
||
59 | */ |
||
60 | 11 | public function __construct( |
|
73 | |||
74 | /** |
||
75 | * @inheritdoc |
||
76 | */ |
||
77 | 10 | public function getConditionCallable(): callable |
|
81 | |||
82 | /** |
||
83 | * @inheritdoc |
||
84 | */ |
||
85 | 10 | public function getOnTrue(): ExecutionBlockInterface |
|
89 | |||
90 | /** |
||
91 | * @inheritdoc |
||
92 | */ |
||
93 | 10 | public function getOnFalse(): ExecutionBlockInterface |
|
97 | |||
98 | /** |
||
99 | * @inheritdoc |
||
100 | */ |
||
101 | 11 | public function getProperties(): array |
|
105 | |||
106 | /** @noinspection PhpDocMissingThrowsInspection |
||
107 | * @param callable $procedureCallable |
||
108 | * |
||
109 | * @return bool |
||
110 | */ |
||
111 | 11 | private function checkConditionCallableSignature(callable $procedureCallable): bool |
|
116 | } |
||
117 |