| 1 | <?php |
||
| 10 | class JumpIfNode extends AbstractNode |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var AbstractNode |
||
| 14 | */ |
||
| 15 | protected $cond; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var Block |
||
| 19 | */ |
||
| 20 | protected $if; |
||
|
|
|||
| 21 | |||
| 22 | /** |
||
| 23 | * @var Block|null |
||
| 24 | */ |
||
| 25 | protected $else; |
||
| 26 | |||
| 27 | public function __construct(AbstractNode $cond, Block $if) |
||
| 28 | { |
||
| 29 | $this->if = $if; |
||
| 30 | $this->cond = $cond; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param Block $if |
||
| 35 | */ |
||
| 36 | public function setIf(Block $if) |
||
| 37 | { |
||
| 38 | $this->if = $if; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param Block $else |
||
| 43 | */ |
||
| 44 | public function setElse(Block $else) |
||
| 45 | { |
||
| 46 | $this->else = $else; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getSubVariables() |
||
| 55 | |||
| 56 | public function getSubBlocks() |
||
| 57 | { |
||
| 58 | return [ |
||
| 63 | } |
||
| 64 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.