diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 9a809ec..7fabd5c 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -77,7 +77,7 @@ A parser instance can be reused to parse multiple files. 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 find($stmts, function(Node $node) { && $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); // Find first class that has name $name diff --git a/lib/PhpParser/Node/Stmt/TryCatch.php b/lib/PhpParser/Node/Stmt/TryCatch.php index 47b9aae..7fc158c 100644 --- a/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/lib/PhpParser/Node/Stmt/TryCatch.php @@ -18,7 +18,7 @@ class TryCatch extends Node\Stmt * * @param Node\Stmt[] $stmts Statements * @param Catch_[] $catches Catches - * @param null|Finally_ $finally Optionaly finally node + * @param null|Finally_ $finally Optional finally node * @param array $attributes Additional 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 { return ['stmts', 'catches', 'finally']; } - + public function getType() : string { return 'Stmt_TryCatch'; }