summaryrefslogtreecommitdiffstats
path: root/src/UtfString.php
diff options
context:
space:
mode:
authorDamian Dlugosz <bigfootdd@gmail.com>2017-01-03 22:06:01 +0100
committerDamian Dlugosz <bigfootdd@gmail.com>2017-01-06 00:11:32 +0100
commita6e45c5e2e006bbd90306e1e947e25e601965657 (patch)
tree07fbbdbe95d08721e97b6683226ad3a26a6e9886 /src/UtfString.php
parent082a1fad6c64f455ac42698cb9c7a08f0347a2c0 (diff)
downloadsql-parser-a6e45c5e2e006bbd90306e1e947e25e601965657.zip
sql-parser-a6e45c5e2e006bbd90306e1e947e25e601965657.tar.gz
sql-parser-a6e45c5e2e006bbd90306e1e947e25e601965657.tar.bz2
Apply php-cs-fixer
Diffstat (limited to 'src/UtfString.php')
-rw-r--r--src/UtfString.php29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/UtfString.php b/src/UtfString.php
index 66ec4e4..91aa19e 100644
--- a/src/UtfString.php
+++ b/src/UtfString.php
@@ -9,9 +9,8 @@
*
* Because the lexer relies on the subscript operator this class had to be
* implemented.
- *
- * @package SqlParser
*/
+
namespace SqlParser;
/**
@@ -20,12 +19,11 @@ namespace SqlParser;
* In this library, this class should be used to parse UTF-8 queries.
*
* @category Misc
- * @package SqlParser
+ *
* @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class UtfString implements \ArrayAccess
{
-
/**
* The raw, multi-byte string.
*
@@ -69,7 +67,7 @@ class UtfString implements \ArrayAccess
/**
* Constructor.
*
- * @param string $str The string.
+ * @param string $str the string
*/
public function __construct($str)
{
@@ -83,7 +81,7 @@ class UtfString implements \ArrayAccess
/**
* Checks if the given offset exists.
*
- * @param int $offset The offset to be checked.
+ * @param int $offset the offset to be checked
*
* @return bool
*/
@@ -95,7 +93,7 @@ class UtfString implements \ArrayAccess
/**
* Gets the character at given offset.
*
- * @param int $offset The offset to be returned.
+ * @param int $offset the offset to be returned
*
* @return string
*/
@@ -136,12 +134,10 @@ class UtfString implements \ArrayAccess
/**
* Sets the value of a character.
*
- * @param int $offset The offset to be set.
- * @param string $value The value to be set.
+ * @param int $offset the offset to be set
+ * @param string $value the value to be set
*
- * @throws \Exception Not implemented.
- *
- * @return void
+ * @throws \Exception not implemented
*/
public function offsetSet($offset, $value)
{
@@ -151,11 +147,9 @@ class UtfString implements \ArrayAccess
/**
* Unsets an index.
*
- * @param int $offset The value to be unset.
- *
- * @throws \Exception Not implemented.
+ * @param int $offset the value to be unset
*
- * @return void
+ * @throws \Exception not implemented
*/
public function offsetUnset($offset)
{
@@ -169,7 +163,7 @@ class UtfString implements \ArrayAccess
* However, this implementation supports UTF-8 characters containing up to 6
* bytes.
*
- * @param string $byte The byte to be analyzed.
+ * @param string $byte the byte to be analyzed
*
* @see https://tools.ietf.org/html/rfc3629
*
@@ -189,6 +183,7 @@ class UtfString implements \ArrayAccess
} elseif ($byte < 252) {
return 5; // unofficial
}
+
return 6; // unofficial
}