Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/BaseTokenizer.php → src/AbstractTokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* Splits an SQL query into individual SQL tokens.
*
* It can be used to obtain an addition information from an SQL code.
* It can be used to obtain addition information from an SQL code.
*
* Usage example:
*
Expand All @@ -31,7 +31,7 @@
*
* Tokens are instances of {@see SqlToken}.
*/
abstract class BaseTokenizer
abstract class AbstractTokenizer
{
/**
* @var int SQL code string length.
Expand All @@ -52,7 +52,7 @@ abstract class BaseTokenizer
private SplStack $tokenStack;

/**
* @var array|SqlToken active token. It's usually a top of the token stack.
* @var array|SqlToken Active token. It's usually a top of the token stack.
*
* @psalm-var SqlToken|SqlToken[]
* @psalm-suppress PropertyNotSetInConstructor
Expand Down Expand Up @@ -136,13 +136,13 @@ public function tokenize(): SqlToken
}

/**
* Returns whether there's a whitespace at the current offset.
* Returns whether there's a space or blank at the current offset.
*
* If this method returns `true`, it has to set the `$length` parameter to the length of the matched string.
*
* @param int $length Length of the matched string.
*
* @return bool Whether there's a whitespace at the current offset.
* @return bool Whether there's a space or blank at the current offset.
*/
abstract protected function isWhitespace(int &$length): bool;

Expand Down
2 changes: 1 addition & 1 deletion src/Builder/LikeConditionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(QueryBuilderInterface $queryBuilder)
}

/**
* @return string character used to escape special characters in LIKE conditions. By default, it's assumed to be
* @return string Character used to escape special characters in LIKE conditions. By default, it's assumed to be
* `\`.
*/
private function getEscapeSql(): string
Expand Down
2 changes: 1 addition & 1 deletion src/SqlTokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* {@see http://www.sqlite.org/draft/tokenreq.html}
* {@see https://sqlite.org/lang.html}
*/
final class SqlTokenizer extends BaseTokenizer
final class SqlTokenizer extends AbstractTokenizer
{
/**
* Returns whether there's a whitespace at the current offset.
Expand Down