From 42e368e964e121d67d418708e2c12000a151aee6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Jul 2015 18:06:41 +0200 Subject: [PATCH 1/2] Fix returnType typehints Fixes issues #207 --- lib/PhpParser/Node/Expr/Closure.php | 2 +- lib/PhpParser/Node/FunctionLike.php | 2 +- lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- lib/PhpParser/Node/Stmt/Function_.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index c9264d6..0cdcd41 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -16,7 +16,7 @@ class Closure extends Expr implements FunctionLike public $params; /** @var ClosureUse[] use()s */ public $uses; - /** @var null|string|Node\Name[] Return type */ + /** @var null|string|Node\Name Return type */ public $returnType; /** @var Node[] Statements */ public $stmts; diff --git a/lib/PhpParser/Node/FunctionLike.php b/lib/PhpParser/Node/FunctionLike.php index f111cde..efe4333 100644 --- a/lib/PhpParser/Node/FunctionLike.php +++ b/lib/PhpParser/Node/FunctionLike.php @@ -23,7 +23,7 @@ interface FunctionLike extends Node /** * Get the declared return type or null * - * @return null|string|Node\Name[] + * @return null|string|Node\Name */ public function getReturnType(); diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 578bbe8..762e9b1 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -16,7 +16,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike public $name; /** @var Node\Param[] Parameters */ public $params; - /** @var null|string|Node\Name[] Return type */ + /** @var null|string|Node\Name Return type */ public $returnType; /** @var Node[] Statements */ public $stmts; diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index e1e27ab..10087d5 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -13,7 +13,7 @@ class Function_ extends Node\Stmt implements FunctionLike public $name; /** @var Node\Param[] Parameters */ public $params; - /** @var null|string|Node\Name[] Return type */ + /** @var null|string|Node\Name Return type */ public $returnType; /** @var Node[] Statements */ public $stmts; From 7fbbf83011fe6e2564d54b720270f963408e08e5 Mon Sep 17 00:00:00 2001 From: Rodrigo Prado Date: Thu, 25 Jun 2015 19:30:22 -0300 Subject: [PATCH 2/2] Added syntax highlighting in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45a21f2..729e19b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ hello\world('foo', 'bar' . 'baz'); You'll get a syntax tree looking roughly like this: -``` +```php array( 0: Stmt_Echo( exprs: array(