1<?php declare(strict_types=1); 2 3namespace PhpParser\Node\Stmt; 4 5use PhpParser\Node; 6 7class Break_ extends Node\Stmt 8{ 9 /** @var null|Node\Expr Number of loops to break */ 10 public $num; 11 12 /** 13 * Constructs a break node. 14 * 15 * @param null|Node\Expr $num Number of loops to break 16 * @param array $attributes Additional attributes 17 */ 18 public function __construct(Node\Expr $num = null, array $attributes = []) { 19 $this->attributes = $attributes; 20 $this->num = $num; 21 } 22 23 public function getSubNodeNames() : array { 24 return ['num']; 25 } 26 27 public function getType() : string { 28 return 'Stmt_Break'; 29 } 30} 31