From a1f72690ef18a21b168f19e45bd921aa7c394007 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 13 Jul 2019 17:14:16 -0400 Subject: [PATCH] Fix harmless typos in documentation --- doc/2_Usage_of_basic_components.markdown | 2 +- doc/component/Walking_the_AST.markdown | 2 +- lib/PhpParser/Node/Stmt/TryCatch.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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'; }