Skip to content

Commit

Permalink
Fixes from PHPStan level 0
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Jan 14, 2018
1 parent 4f4b369 commit f752544
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Core
* error might be false positive or a partial result (even a bad one)
* might be needed.
*
* @var Exception[]
* @var \Exception[]
*
* @see Core::error()
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public function parse()
// Statements can start with keywords only.
// Comments, whitespaces, etc. are ignored.
if ($token->type !== Token::TYPE_KEYWORD) {
if (($token->type !== TOKEN::TYPE_COMMENT)
if (($token->type !== Token::TYPE_COMMENT)
&& ($token->type !== Token::TYPE_WHITESPACE)
&& ($token->type !== Token::TYPE_OPERATOR) // `(` and `)`
&& ($token->type !== Token::TYPE_DELIMITER)
Expand Down
2 changes: 1 addition & 1 deletion src/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function parse(Parser $parser, TokensList $list)
// Only keywords are relevant here. Other parts of the query are
// processed in the functions below.
if ($token->type !== Token::TYPE_KEYWORD) {
if (($token->type !== TOKEN::TYPE_COMMENT)
if (($token->type !== Token::TYPE_COMMENT)
&& ($token->type !== Token::TYPE_WHITESPACE)
) {
$parser->error('Unexpected token.', $token);
Expand Down
1 change: 1 addition & 0 deletions src/Statements/InsertStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace PhpMyAdmin\SqlParser\Statements;

use PhpMyAdmin\SqlParser\Components\ArrayObj;
use PhpMyAdmin\SqlParser\Components\Array2d;
use PhpMyAdmin\SqlParser\Components\IntoKeyword;
use PhpMyAdmin\SqlParser\Components\OptionsArray;
Expand Down
1 change: 1 addition & 0 deletions src/Statements/SelectStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use PhpMyAdmin\SqlParser\Components\IntoKeyword;
use PhpMyAdmin\SqlParser\Components\JoinKeyword;
use PhpMyAdmin\SqlParser\Components\Limit;
use PhpMyAdmin\SqlParser\Components\OptionsArray;
use PhpMyAdmin\SqlParser\Components\OrderKeyword;
use PhpMyAdmin\SqlParser\Statement;

Expand Down

0 comments on commit f752544

Please sign in to comment.