| Total Complexity | 2 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class BranchNode extends PayloadNodeAbstract implements BranchNodeInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * This Node is a Branch |
||
| 22 | * |
||
| 23 | * @var bool |
||
| 24 | */ |
||
| 25 | protected $isAFlow = true; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var FlowInterface |
||
| 29 | */ |
||
| 30 | protected $payload; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Instantiate the BranchNode |
||
| 34 | * |
||
| 35 | * @param FlowInterface $payload |
||
| 36 | * @param bool $isAReturningVal |
||
| 37 | * |
||
| 38 | * @throws NodalFlowException |
||
| 39 | */ |
||
| 40 | public function __construct(FlowInterface $payload, bool $isAReturningVal) |
||
| 41 | { |
||
| 42 | // branch Node does not (yet) support traversing |
||
| 43 | parent::__construct($payload, $isAReturningVal, false); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Execute the BranchNode |
||
| 48 | * |
||
| 49 | * @param mixed|null $param |
||
| 50 | * |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public function exec($param = null) |
||
| 57 | } |
||
| 58 | } |
||
| 59 |