Lines Matching refs:stmt
569 foreach ($stmts as $stmt) {
570 if ($stmt instanceof Node\Stmt\Namespace_) {
572 } elseif (!$stmt instanceof Node\Stmt\HaltCompiler
573 && !$stmt instanceof Node\Stmt\Nop
576 'No code may exist outside of namespace {}', $stmt->getAttributes()));
586 foreach ($stmts as $stmt) {
587 if ($stmt instanceof Node\Stmt\Namespace_) {
591 if ($stmt->stmts === null) {
592 $stmt->stmts = [];
593 $targetStmts = &$stmt->stmts;
594 $resultStmts[] = $stmt;
597 $resultStmts[] = $stmt;
600 $lastNs = $stmt;
601 } elseif ($stmt instanceof Node\Stmt\HaltCompiler) {
603 $resultStmts[] = $stmt;
605 $targetStmts[] = $stmt;
615 private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { argument
618 if (empty($stmt->stmts)) {
625 $lastStmt = $stmt->stmts[count($stmt->stmts) - 1];
628 $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute));
659 foreach ($stmts as $i => $stmt) {
660 if ($stmt instanceof Node\Stmt\Namespace_) {
661 $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace';
667 $this->getNamespaceErrorAttributes($stmt)
673 $this->getNamespaceErrorAttributes($stmt)
682 if ($stmt instanceof Node\Stmt\Declare_
683 || $stmt instanceof Node\Stmt\HaltCompiler
684 || $stmt instanceof Node\Stmt\Nop) {
689 …if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->valu…
1057 foreach ($node->stmts as $stmt) {
1058 if ($stmt instanceof Namespace_) {
1060 'Namespace declarations cannot be nested', $stmt->getAttributes()