diff options
Diffstat (limited to 'src/Utils')
-rw-r--r-- | src/Utils/BufferedQuery.php | 5 | ||||
-rw-r--r-- | src/Utils/Error.php | 10 | ||||
-rw-r--r-- | src/Utils/Formatter.php | 5 |
3 files changed, 8 insertions, 12 deletions
diff --git a/src/Utils/BufferedQuery.php b/src/Utils/BufferedQuery.php index e58165a..1da0b81 100644 --- a/src/Utils/BufferedQuery.php +++ b/src/Utils/BufferedQuery.php @@ -186,7 +186,6 @@ class BufferedQuery $loopLen = $end ? $len : $len - 16; for (; $i < $loopLen; ++$i) { - /* * Handling special parses statuses. */ @@ -285,7 +284,6 @@ class BufferedQuery && (($this->query[$i + 8] === 'R') || ($this->query[$i + 8] === 'r')) && (Context::isWhitespace($this->query[$i + 9])) ) { - // Saving the current index to be able to revert any parsing // done in this block. $iBak = $i; @@ -307,14 +305,12 @@ class BufferedQuery && ((($i < $len) && (Context::isWhitespace($this->query[$i]))) || (($i === $len) && ($end))) ) { - // Saving the delimiter. $this->setDelimiter($delimiter); // Whether this statement should be returned or not. $ret = ''; if (!empty($this->options['parse_delimiter'])) { - // Appending the `DELIMITER` statement that was just // found to the current statement. $ret = trim( @@ -351,7 +347,6 @@ class BufferedQuery && (($this->delimiterLen === 1) || (substr($this->query, $i, $this->delimiterLen) === $this->delimiter)) ) { - // Saving the statement that just ended. $ret = $this->current; diff --git a/src/Utils/Error.php b/src/Utils/Error.php index df6d513..a9c0814 100644 --- a/src/Utils/Error.php +++ b/src/Utils/Error.php @@ -78,14 +78,20 @@ class Error * @return array */ public static function format( - $errors, $format = '#%1$d: %2$s (near "%4$s" at position %5$d)' + $errors, + $format = '#%1$d: %2$s (near "%4$s" at position %5$d)' ) { $ret = array(); $i = 0; foreach ($errors as $key => $err) { $ret[$key] = sprintf( - $format, ++$i, $err[0], $err[1], $err[2], $err[3] + $format, + ++$i, + $err[0], + $err[1], + $err[2], + $err[3] ); } diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php index ebdea42..ea4b419 100644 --- a/src/Utils/Formatter.php +++ b/src/Utils/Formatter.php @@ -257,7 +257,6 @@ class Formatter // `$prev` and `$curr` which store two consecutive tokens. // Actually, at every iteration the previous token is being used. for ($list->idx = 0; $list->idx < $list->count; ++$list->idx) { - /** * Token parsed at this moment. * @@ -266,11 +265,9 @@ class Formatter $curr = $list->tokens[$list->idx]; if ($curr->type === Token::TYPE_WHITESPACE) { - // Whitespaces are skipped because the formatter adds its own. continue; } elseif ($curr->type === Token::TYPE_COMMENT) { - // Whether the comments should be parsed. if (!empty($this->options['remove_comments'])) { continue; @@ -297,7 +294,6 @@ class Formatter // Checking if pointers were initialized. if ($prev !== null) { - // Checking if a new clause started. if (static::isClause($prev) !== false) { $lastClause = $prev->value; @@ -428,7 +424,6 @@ class Formatter if (($token->type === $format['type']) && (($token->flags & $format['flags']) === $format['flags']) ) { - // Running transformation function. if (!empty($format['function'])) { $func = $format['function']; |