From a77a0c0a3d626c3c97844554d7d4c80d559a46f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Fri, 27 Oct 2023 19:07:55 +0000 Subject: [PATCH 1/2] Fix typos --- README.md | 6 +++--- snippet/list.php | 2 +- snippet/try_catch.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 99de4d3..77c2084 100644 --- a/README.md +++ b/README.md @@ -1074,7 +1074,7 @@ use PhpParser\Node\Expr\List_; use PhpParser\Node\Expr\Variable; $variable = new Variable('variableName'); -$anotherVariable = new Variable('anoterVariableName'); +$anotherVariable = new Variable('anotherVariableName'); $arrayItems = [new ArrayItem($variable), new ArrayItem($anotherVariable)]; @@ -1084,7 +1084,7 @@ return new List_($arrayItems); ↓ ```php -list($variableName, $anoterVariableName) +list($variableName, $anotherVariableName) ```
@@ -2806,7 +2806,7 @@ $echo = new Echo_([new String_('one')]); $tryStmts = [$echo]; $echo2 = new Echo_([new String_('two')]); -$catch = new Catch_([new FullyQualified('CatchedType')], null, [$echo2]); +$catch = new Catch_([new FullyQualified('CaughtType')], null, [$echo2]); $echo3 = new Echo_([new String_('three')]); $finally = new Finally_([$echo3]); diff --git a/snippet/list.php b/snippet/list.php index 37b9e4b..41b6067 100644 --- a/snippet/list.php +++ b/snippet/list.php @@ -7,7 +7,7 @@ use PhpParser\Node\Expr\Variable; $variable = new Variable('variableName'); -$anotherVariable = new Variable('anoterVariableName'); +$anotherVariable = new Variable('anotherVariableName'); $arrayItems = [new ArrayItem($variable), new ArrayItem($anotherVariable)]; diff --git a/snippet/try_catch.php b/snippet/try_catch.php index bfeb6c6..f7135cf 100644 --- a/snippet/try_catch.php +++ b/snippet/try_catch.php @@ -13,7 +13,7 @@ $tryStmts = [$echo]; $echo2 = new Echo_([new String_('two')]); -$catch = new Catch_([new FullyQualified('CatchedType')], null, [$echo2]); +$catch = new Catch_([new FullyQualified('CaughtType')], null, [$echo2]); $echo3 = new Echo_([new String_('three')]); $finally = new Finally_([$echo3]); From be06ca58880ce7969d72c310266ab037a5042953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 28 Oct 2023 09:32:59 +0000 Subject: [PATCH 2/2] Correct to "SomeType" --- README.md | 4 ++-- snippet/try_catch.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 77c2084..48add1a 100644 --- a/README.md +++ b/README.md @@ -2806,7 +2806,7 @@ $echo = new Echo_([new String_('one')]); $tryStmts = [$echo]; $echo2 = new Echo_([new String_('two')]); -$catch = new Catch_([new FullyQualified('CaughtType')], null, [$echo2]); +$catch = new Catch_([new FullyQualified('SomeType')], null, [$echo2]); $echo3 = new Echo_([new String_('three')]); $finally = new Finally_([$echo3]); @@ -2819,7 +2819,7 @@ return new TryCatch($tryStmts, [$catch]); ```php try { echo 'one'; -} catch (\CatchedType) { +} catch (\SomeType) { echo 'two'; } ``` diff --git a/snippet/try_catch.php b/snippet/try_catch.php index f7135cf..737c673 100644 --- a/snippet/try_catch.php +++ b/snippet/try_catch.php @@ -13,7 +13,7 @@ $tryStmts = [$echo]; $echo2 = new Echo_([new String_('two')]); -$catch = new Catch_([new FullyQualified('CaughtType')], null, [$echo2]); +$catch = new Catch_([new FullyQualified('SomeType')], null, [$echo2]); $echo3 = new Echo_([new String_('three')]); $finally = new Finally_([$echo3]);