| Total Complexity | 18 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class OperationNode extends Node |
||
| 17 | { |
||
| 18 | const ADD = '+'; |
||
| 19 | const SUB = '-'; |
||
| 20 | const OR_OPERATOR = '|'; |
||
| 21 | const AND_OPERATOR = '&'; |
||
| 22 | const SHIFT_LEFT = '<<'; |
||
| 23 | const SHIFT_RIGHT = '>>'; |
||
| 24 | const MOD = '%'; |
||
| 25 | const DIV = '/'; |
||
| 26 | const MUL = '*'; |
||
| 27 | const POW = '**'; |
||
| 28 | const CONCAT = '.'; |
||
| 29 | |||
| 30 | private $left; |
||
| 31 | private $right; |
||
| 32 | private $operand; |
||
| 33 | |||
| 34 | 91 | public function __construct($left, $right, $operand) |
|
| 39 | 91 | } |
|
| 40 | |||
| 41 | 7 | public function setParent(Node $parent) |
|
| 42 | { |
||
| 43 | 7 | if ($this->left instanceof Node) { |
|
| 44 | 6 | $this->left->setParent($parent); |
|
| 45 | 6 | } |
|
| 46 | 7 | if ($this->right instanceof Node) { |
|
| 47 | 3 | $this->right->setParent($parent); |
|
| 48 | 3 | } |
|
| 49 | 7 | } |
|
| 50 | |||
| 51 | 91 | public function getNativeValue() |
|
| 79 | } |
||
| 80 | } |
||
| 82 |