diff options
Diffstat (limited to 'src/Utils')
-rw-r--r-- | src/Utils/BufferedQuery.php | 2 | ||||
-rw-r--r-- | src/Utils/CLI.php | 2 | ||||
-rw-r--r-- | src/Utils/Error.php | 4 | ||||
-rw-r--r-- | src/Utils/Formatter.php | 6 | ||||
-rw-r--r-- | src/Utils/Misc.php | 2 | ||||
-rw-r--r-- | src/Utils/Query.php | 2 | ||||
-rw-r--r-- | src/Utils/Routine.php | 2 | ||||
-rw-r--r-- | src/Utils/Table.php | 2 | ||||
-rw-r--r-- | src/Utils/Tokens.php | 4 |
9 files changed, 13 insertions, 13 deletions
diff --git a/src/Utils/BufferedQuery.php b/src/Utils/BufferedQuery.php index 5edf903..c2dd074 100644 --- a/src/Utils/BufferedQuery.php +++ b/src/Utils/BufferedQuery.php @@ -1,8 +1,8 @@ <?php - /** * Buffered query utilities. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; diff --git a/src/Utils/CLI.php b/src/Utils/CLI.php index d2c27f2..31d09ce 100644 --- a/src/Utils/CLI.php +++ b/src/Utils/CLI.php @@ -1,8 +1,8 @@ <?php - /** * CLI interface. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; diff --git a/src/Utils/Error.php b/src/Utils/Error.php index af9706f..d0f82ed 100644 --- a/src/Utils/Error.php +++ b/src/Utils/Error.php @@ -1,8 +1,8 @@ <?php - /** * Error related utilities. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; @@ -86,7 +86,7 @@ class Error ++$i, $err[0], $err[1], - htmlspecialchars($err[2]), + htmlspecialchars((string) $err[2]), $err[3] ); } diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php index 2d2ca40..94d908c 100644 --- a/src/Utils/Formatter.php +++ b/src/Utils/Formatter.php @@ -1,8 +1,8 @@ <?php - /** * Utilities that are used for formatting queries. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; @@ -500,7 +500,7 @@ class Formatter // No space after . ( || ($curr->type === Token::TYPE_OPERATOR && ($curr->value === '.' || $curr->value === ',' || $curr->value === '(' || $curr->value === ')')) // No space before . , ( ) - || $curr->type === Token::TYPE_DELIMITER && mb_strlen($curr->value, 'UTF-8') < 2 + || $curr->type === Token::TYPE_DELIMITER && mb_strlen((string) $curr->value, 'UTF-8') < 2 ) ) { $ret .= ' '; @@ -706,7 +706,7 @@ class Formatter } // Keeping track of this group's length. - $length += mb_strlen($list->tokens[$idx]->value, 'UTF-8'); + $length += mb_strlen((string) $list->tokens[$idx]->value, 'UTF-8'); } return $length; diff --git a/src/Utils/Misc.php b/src/Utils/Misc.php index aa9e13a..9e3ae02 100644 --- a/src/Utils/Misc.php +++ b/src/Utils/Misc.php @@ -1,8 +1,8 @@ <?php - /** * Miscellaneous utilities. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; diff --git a/src/Utils/Query.php b/src/Utils/Query.php index 1416629..662404b 100644 --- a/src/Utils/Query.php +++ b/src/Utils/Query.php @@ -1,8 +1,8 @@ <?php - /** * Statement utilities. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; diff --git a/src/Utils/Routine.php b/src/Utils/Routine.php index 50f319a..9842ff1 100644 --- a/src/Utils/Routine.php +++ b/src/Utils/Routine.php @@ -1,8 +1,8 @@ <?php - /** * Routine utilities. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; diff --git a/src/Utils/Table.php b/src/Utils/Table.php index 49e3f35..140ed2a 100644 --- a/src/Utils/Table.php +++ b/src/Utils/Table.php @@ -1,8 +1,8 @@ <?php - /** * Table utilities. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; diff --git a/src/Utils/Tokens.php b/src/Utils/Tokens.php index cde1a79..b7f5935 100644 --- a/src/Utils/Tokens.php +++ b/src/Utils/Tokens.php @@ -1,8 +1,8 @@ <?php - /** * Token utilities. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; @@ -44,7 +44,7 @@ class Tokens } if (isset($pattern['value_str']) - && strcasecmp($pattern['value_str'], $token->value) + && strcasecmp($pattern['value_str'], (string) $token->value) ) { return false; } |