mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-30 04:19:30 +01:00
Fix harmless typos in documentation
This commit is contained in:
parent
2e2954ccdf
commit
a1f72690ef
@ -77,7 +77,7 @@ A parser instance can be reused to parse multiple files.
|
|||||||
Node dumping
|
Node dumping
|
||||||
------------
|
------------
|
||||||
|
|
||||||
To dump the abstact syntax tree in human readable form, a `NodeDumper` can be used:
|
To dump the abstract syntax tree in human readable form, a `NodeDumper` can be used:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
@ -312,7 +312,7 @@ $extendingClasses = $nodeFinder->find($stmts, function(Node $node) {
|
|||||||
&& $node->extends !== null;
|
&& $node->extends !== null;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Find first class occuring in the AST. Returns null if no class exists.
|
// Find first class occurring in the AST. Returns null if no class exists.
|
||||||
$class = $nodeFinder->findFirstInstanceOf($stmts, Node\Stmt\Class_::class);
|
$class = $nodeFinder->findFirstInstanceOf($stmts, Node\Stmt\Class_::class);
|
||||||
|
|
||||||
// Find first class that has name $name
|
// Find first class that has name $name
|
||||||
|
@ -18,7 +18,7 @@ class TryCatch extends Node\Stmt
|
|||||||
*
|
*
|
||||||
* @param Node\Stmt[] $stmts Statements
|
* @param Node\Stmt[] $stmts Statements
|
||||||
* @param Catch_[] $catches Catches
|
* @param Catch_[] $catches Catches
|
||||||
* @param null|Finally_ $finally Optionaly finally node
|
* @param null|Finally_ $finally Optional finally node
|
||||||
* @param array $attributes Additional attributes
|
* @param array $attributes Additional attributes
|
||||||
*/
|
*/
|
||||||
public function __construct(array $stmts, array $catches, Finally_ $finally = null, array $attributes = []) {
|
public function __construct(array $stmts, array $catches, Finally_ $finally = null, array $attributes = []) {
|
||||||
@ -31,7 +31,7 @@ class TryCatch extends Node\Stmt
|
|||||||
public function getSubNodeNames() : array {
|
public function getSubNodeNames() : array {
|
||||||
return ['stmts', 'catches', 'finally'];
|
return ['stmts', 'catches', 'finally'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType() : string {
|
public function getType() : string {
|
||||||
return 'Stmt_TryCatch';
|
return 'Stmt_TryCatch';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user