| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace PhpParser\Node\Expr; |
| 4: | |
| 5: | use PhpParser\Node\Expr; |
| 6: | |
| 7: | class Ternary extends Expr |
| 8: | { |
| 9: | |
| 10: | public $cond; |
| 11: | |
| 12: | public $if; |
| 13: | |
| 14: | public $else; |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | public function __construct(Expr $cond, $if, Expr $else, array $attributes = []) { |
| 25: | $this->attributes = $attributes; |
| 26: | $this->cond = $cond; |
| 27: | $this->if = $if; |
| 28: | $this->else = $else; |
| 29: | } |
| 30: | |
| 31: | public function getSubNodeNames() : array { |
| 32: | return ['cond', 'if', 'else']; |
| 33: | } |
| 34: | |
| 35: | public function getType() : string { |
| 36: | return 'Expr_Ternary'; |
| 37: | } |
| 38: | } |
| 39: | |