Home
last modified time | relevance | path

Searched refs:stmt (Results 1 – 12 of 12) sorted by relevance

/PHP-Parser/lib/PhpParser/Node/Stmt/
H A DClassLike.php24 foreach ($this->stmts as $stmt) {
26 $traitUses[] = $stmt;
37 foreach ($this->stmts as $stmt) {
39 $constants[] = $stmt;
50 foreach ($this->stmts as $stmt) {
52 $properties[] = $stmt;
66 foreach ($this->stmts as $stmt) {
70 return $stmt;
87 $methods[] = $stmt;
103 if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) {
[all …]
/PHP-Parser/lib/PhpParser/Builder/
H A DTrait_.php39 public function addStmt($stmt) { argument
40 $stmt = BuilderHelpers::normalizeNode($stmt);
42 if ($stmt instanceof Stmt\Property) {
43 $this->properties[] = $stmt;
44 } elseif ($stmt instanceof Stmt\ClassMethod) {
45 $this->methods[] = $stmt;
46 } elseif ($stmt instanceof Stmt\TraitUse) {
47 $this->uses[] = $stmt;
48 } elseif ($stmt instanceof Stmt\ClassConst) {
49 $this->constants[] = $stmt;
[all …]
H A DEnum_.php72 public function addStmt($stmt) { argument
73 $stmt = BuilderHelpers::normalizeNode($stmt);
75 if ($stmt instanceof Stmt\EnumCase) {
76 $this->enumCases[] = $stmt;
77 } elseif ($stmt instanceof Stmt\ClassMethod) {
78 $this->methods[] = $stmt;
79 } elseif ($stmt instanceof Stmt\TraitUse) {
80 $this->uses[] = $stmt;
81 } elseif ($stmt instanceof Stmt\ClassConst) {
82 $this->constants[] = $stmt;
[all …]
H A DInterface_.php53 public function addStmt($stmt) { argument
54 $stmt = BuilderHelpers::normalizeNode($stmt);
56 if ($stmt instanceof Stmt\ClassConst) {
57 $this->constants[] = $stmt;
58 } elseif ($stmt instanceof Stmt\ClassMethod) {
60 $stmt->stmts = null;
61 $this->methods[] = $stmt;
63 throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
H A DClass_.php106 public function addStmt($stmt) { argument
107 $stmt = BuilderHelpers::normalizeNode($stmt);
109 if ($stmt instanceof Stmt\Property) {
110 $this->properties[] = $stmt;
111 } elseif ($stmt instanceof Stmt\ClassMethod) {
112 $this->methods[] = $stmt;
113 } elseif ($stmt instanceof Stmt\TraitUse) {
114 $this->uses[] = $stmt;
115 } elseif ($stmt instanceof Stmt\ClassConst) {
116 $this->constants[] = $stmt;
[all …]
H A DDeclaration.php19 abstract public function addStmt($stmt); argument
29 foreach ($stmts as $stmt) {
30 $this->addStmt($stmt);
H A DNamespace_.php31 public function addStmt($stmt) { argument
32 $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
H A DFunction_.php34 public function addStmt($stmt) { argument
35 $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
H A DMethod.php109 public function addStmt($stmt) { argument
114 $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
/PHP-Parser/lib/PhpParser/
H A DParserAbstract.php569 foreach ($stmts as $stmt) {
586 foreach ($stmts as $stmt) {
592 $stmt->stmts = [];
600 $lastNs = $stmt;
603 $resultStmts[] = $stmt;
605 $targetStmts[] = $stmt;
618 if (empty($stmt->stmts)) {
625 $lastStmt = $stmt->stmts[count($stmt->stmts) - 1];
659 foreach ($stmts as $i => $stmt) {
689 …if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->valu…
[all …]
/PHP-Parser/test/PhpParser/NodeVisitor/
H A DNameResolverTest.php425 public function testError(Node $stmt, $errorMsg): void { argument
431 $traverser->traverse([$stmt]);
491 $stmt = $stmts[0];
493 $assign = $stmt->stmts[1]->expr;
/PHP-Parser/test/PhpParser/
H A DBuilderHelpersTest.php26 $stmt = new Node\Stmt\Class_('Class');
27 $this->assertSame($stmt, BuilderHelpers::normalizeStmt($stmt));

Completed in 20 milliseconds