diff options
Diffstat (limited to 'src/Token.php')
-rw-r--r-- | src/Token.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/Token.php b/src/Token.php index f2f9860..23d1645 100644 --- a/src/Token.php +++ b/src/Token.php @@ -1,20 +1,16 @@ <?php - /** * Defines a token along with a set of types and flags and utility functions. * * An array of tokens will result after parsing the query. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser; /** * A structure representing a lexeme that explicitly indicates its * categorization for the purpose of parsing. - * - * @category Tokens - * - * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+ */ class Token { @@ -215,8 +211,6 @@ class Token public $position; /** - * Constructor. - * * @param string $token the value of the token * @param int $type the type of the token * @param int $flags the flags of the token @@ -300,7 +294,7 @@ class Token // in PHP 5.3- the `null` parameter isn't handled correctly. $str = mb_substr( $str, - (! empty($str[1]) && ($str[1] === '@')) ? 2 : 1, + ! empty($str[1]) && ($str[1] === '@') ? 2 : 1, mb_strlen($str), 'UTF-8' ); @@ -330,16 +324,16 @@ class Token public function getInlineToken() { return str_replace( - array( + [ "\r", "\n", "\t", - ), - array( + ], + [ '\r', '\n', '\t', - ), + ], $this->token ); } |