From 92f793001b466e9c26528ba9a4151efa64bfa8eb Mon Sep 17 00:00:00 2001 From: nikic Date: Wed, 28 Sep 2011 16:26:51 +0200 Subject: [PATCH] Fix some readme + doccomment typos --- README.md | 7 ++++--- lib/PHPParser/Node/Expr/LambdaFunc.php | 2 +- lib/PHPParser/Node/Scalar/DNumber.php | 2 +- lib/PHPParser/Node/Stmt/Case.php | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 280d772..dbf4fa3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ PHP Parser This is a PHP parser written in PHP. It's purpose is to simplify static code analysis and manipulation. -***Note: This project is highly experimental. It may not always function correctly.*** +***Note: This project is experimental. There are no known bugs in the parser itself, but the API is +subject to change.*** Components ========== @@ -21,11 +22,11 @@ Autoloader In order to automatically include required files `PHPParser_Autoloader` can be used: - require_once 'path/to/phpparser/lib/PHPParser/Autoloader.php'; + require_once 'path/to/PHP-Parser/lib/PHPParser/Autoloader.php'; PHPParser_Autoloader::register(); Parser and Parser_Debug ----------------------- +----------------------- Parsing is performed using `PHPParser_Parser->parse()`. This method accepts a `PHPParser_Lexer` as the only parameter and returns an array of statement nodes. If an error occurs it throws a diff --git a/lib/PHPParser/Node/Expr/LambdaFunc.php b/lib/PHPParser/Node/Expr/LambdaFunc.php index 8b9e4ed..9b8c393 100644 --- a/lib/PHPParser/Node/Expr/LambdaFunc.php +++ b/lib/PHPParser/Node/Expr/LambdaFunc.php @@ -18,7 +18,7 @@ class PHPParser_Node_Expr_LambdaFunc extends PHPParser_Node_Expr * @param int $line Line * @param null|string $docComment Nearest doc comment */ - public function __construct(array $stmts, array $params = array(), $uses = array(), $byRef = false, $line = -1, $docComment = null) { + public function __construct(array $stmts, array $params = array(), array $uses = array(), $byRef = false, $line = -1, $docComment = null) { parent::__construct( array( 'stmts' => $stmts, diff --git a/lib/PHPParser/Node/Scalar/DNumber.php b/lib/PHPParser/Node/Scalar/DNumber.php index 1c8e823..039fc5e 100644 --- a/lib/PHPParser/Node/Scalar/DNumber.php +++ b/lib/PHPParser/Node/Scalar/DNumber.php @@ -8,7 +8,7 @@ class PHPParser_Node_Scalar_DNumber extends PHPParser_Node_Scalar /** * Constructs a float number scalar node. * - * @param double $value Value of the number + * @param float $value Value of the number * @param int $line Line * @param null|string $docComment Nearest doc comment */ diff --git a/lib/PHPParser/Node/Stmt/Case.php b/lib/PHPParser/Node/Stmt/Case.php index a2fc695..8d3e8c5 100644 --- a/lib/PHPParser/Node/Stmt/Case.php +++ b/lib/PHPParser/Node/Stmt/Case.php @@ -2,7 +2,7 @@ /** * @property PHPParser_Node[] $stmts Statements - * @property null|PHPParser_Node_Expr $cond Condition (null for default) + * @property null|PHPParser_Node_Expr $cond Condition (null for default) */ class PHPParser_Node_Stmt_Case extends PHPParser_Node_Stmt {