diff options
Diffstat (limited to 'src/UtfString.php')
-rw-r--r-- | src/UtfString.php | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/UtfString.php b/src/UtfString.php index 5127b5b..cb4187c 100644 --- a/src/UtfString.php +++ b/src/UtfString.php @@ -1,5 +1,4 @@ <?php - /** * Implementation for UTF-8 strings. * @@ -10,19 +9,19 @@ * Because the lexer relies on the subscript operator this class had to be * implemented. */ +declare(strict_types=1); namespace PhpMyAdmin\SqlParser; +use ArrayAccess; +use Exception; + /** * Implements array-like access for UTF-8 strings. * * In this library, this class should be used to parse UTF-8 queries. - * - * @category Misc - * - * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+ */ -class UtfString implements \ArrayAccess +class UtfString implements ArrayAccess { /** * The raw, multi-byte string. @@ -65,8 +64,6 @@ class UtfString implements \ArrayAccess public $charLen = 0; /** - * Constructor. - * * @param string $str the string */ public function __construct($str) @@ -141,11 +138,11 @@ class UtfString implements \ArrayAccess * @param int $offset the offset to be set * @param string $value the value to be set * - * @throws \Exception not implemented + * @throws Exception not implemented. */ public function offsetSet($offset, $value) { - throw new \Exception('Not implemented.'); + throw new Exception('Not implemented.'); } /** @@ -153,11 +150,11 @@ class UtfString implements \ArrayAccess * * @param int $offset the value to be unset * - * @throws \Exception not implemented + * @throws Exception not implemented. */ public function offsetUnset($offset) { - throw new \Exception('Not implemented.'); + throw new Exception('Not implemented.'); } /** @@ -167,10 +164,10 @@ class UtfString implements \ArrayAccess * However, this implementation supports UTF-8 characters containing up to 6 * bytes. * - * @param string $byte the byte to be analyzed - * * @see https://tools.ietf.org/html/rfc3629 * + * @param string $byte the byte to be analyzed + * * @return int */ public static function getCharLength($byte) |