File tree Expand file tree Collapse file tree 6 files changed +9
-8
lines changed Expand file tree Collapse file tree 6 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public function getParent() {
7878 * Gets first ancestor that is an instance of one of the provided classes.
7979 * Returns null if there is no match.
8080 *
81- * @param array ...$classNames
81+ * @param string ...$classNames
8282 * @return Node|null
8383 */
8484 public function getFirstAncestor (...$ classNames ) {
@@ -139,7 +139,7 @@ public function getFirstDescendantNode(...$classNames) {
139139
140140 /**
141141 * Gets root of the syntax tree (returns self if has no parents)
142- * @return Node
142+ * @return SourceFileNode (expect root to be SourceFileNode unless the tree was manipulated)
143143 */
144144 public function getRoot () : Node {
145145 $ node = $ this ;
@@ -450,7 +450,7 @@ public function __toString() {
450450 * @throws \Exception
451451 */
452452 public function getImportTablesForCurrentScope () {
453- $ namespaceDefinition = $ namespaceDefinition ?? $ this ->getNamespaceDefinition ();
453+ $ namespaceDefinition = $ this ->getNamespaceDefinition ();
454454
455455 // Use declarations can exist in either the global scope, or inside namespace declarations.
456456 // http://php.net/manual/en/language.namespaces.importing.php#language.namespaces.importing.scope
Original file line number Diff line number Diff line change 77namespace Microsoft \PhpParser \Node \Expression ;
88
99use Microsoft \PhpParser \Node \Expression ;
10+ use Microsoft \PhpParser \Node \DelimitedList \ExpressionList ;
1011use Microsoft \PhpParser \Token ;
1112
1213class EchoExpression extends Expression {
1314
1415 /** @var Token */
1516 public $ echoKeyword ;
1617
17- /** @var Expression[] */
18+ /** @var ExpressionList */
1819 public $ expressions ;
1920
2021 const CHILD_NAMES = [
Original file line number Diff line number Diff line change 99use Microsoft \PhpParser \Token ;
1010
1111class NumericLiteral extends Expression {
12- /** @var Token[] */
12+ /** @var Token */
1313 public $ children ;
1414
1515 const CHILD_NAMES = [
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ public function getLastNamePart() {
157157 /**
158158 * @param ResolvedName[] $importTable
159159 * @param bool $isCaseSensitive
160- * @return null
160+ * @return string| null
161161 */
162162 private function tryResolveFromImportTable ($ importTable , bool $ isCaseSensitive = false ) {
163163 $ content = $ this ->getFileContents ();
Original file line number Diff line number Diff line change 99use Microsoft \PhpParser \Token ;
1010
1111class ReservedWord extends Expression {
12- /** @var Token[] */
12+ /** @var Token */
1313 public $ children ;
1414
1515 const CHILD_NAMES = [
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class StringLiteral extends Expression {
1313 /** @var Token */
1414 public $ startQuote ;
1515
16- /** @var Token[] | Node[] */
16+ /** @var Token[]| Node[]|Token */
1717 public $ children ;
1818
1919 /** @var Token */
You can’t perform that action at this time.
0 commit comments