summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2019-12-31 21:13:48 +0100
committerWilliam Desportes <williamdes@wdes.fr>2019-12-31 21:22:17 +0100
commit3129c88d83b5978f1dbc1742420f46728d19b730 (patch)
treede198a522805284dd3307121bfa5d5028abfb3bb /src
parent365f75845cc0ea38e03dc7ebfe54cf1405242299 (diff)
downloadsql-parser-3129c88d83b5978f1dbc1742420f46728d19b730.zip
sql-parser-3129c88d83b5978f1dbc1742420f46728d19b730.tar.gz
sql-parser-3129c88d83b5978f1dbc1742420f46728d19b730.tar.bz2
Fix phpdoc using phpstan level 3
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'src')
-rw-r--r--src/Components/DataType.php2
-rw-r--r--src/Components/Expression.php2
-rw-r--r--src/Components/IntoKeyword.php2
-rw-r--r--src/Components/UnionKeyword.php4
-rw-r--r--src/Context.php14
-rw-r--r--src/TokensList.php6
-rw-r--r--src/UtfString.php2
-rw-r--r--src/Utils/BufferedQuery.php2
8 files changed, 17 insertions, 17 deletions
diff --git a/src/Components/DataType.php b/src/Components/DataType.php
index 0d8dea3..d19d434 100644
--- a/src/Components/DataType.php
+++ b/src/Components/DataType.php
@@ -94,7 +94,7 @@ class DataType extends Component
* @param TokensList $list the list of tokens that are being parsed
* @param array $options parameters for parsing
*
- * @return DataType
+ * @return DataType|null
*/
public static function parse(Parser $parser, TokensList $list, array $options = array())
{
diff --git a/src/Components/Expression.php b/src/Components/Expression.php
index 67767dc..2cf119b 100644
--- a/src/Components/Expression.php
+++ b/src/Components/Expression.php
@@ -153,7 +153,7 @@ class Expression extends Component
* @param TokensList $list the list of tokens that are being parsed
* @param array $options parameters for parsing
*
- * @return Expression
+ * @return Expression|null
*/
public static function parse(Parser $parser, TokensList $list, array $options = array())
{
diff --git a/src/Components/IntoKeyword.php b/src/Components/IntoKeyword.php
index a31f6a0..dea5d9d 100644
--- a/src/Components/IntoKeyword.php
+++ b/src/Components/IntoKeyword.php
@@ -118,7 +118,7 @@ class IntoKeyword extends Component
* @param array $columns column list of destination
* @param array $values selected fields
* @param OptionsArray $fields_options options for FIELDS/COLUMNS keyword
- * @param OptionsArray $fields_keyword options for OPTINOS keyword
+ * @param bool $fields_keyword options for OPTIONS keyword
*/
public function __construct(
$type = null,
diff --git a/src/Components/UnionKeyword.php b/src/Components/UnionKeyword.php
index 2de5126..6867615 100644
--- a/src/Components/UnionKeyword.php
+++ b/src/Components/UnionKeyword.php
@@ -18,8 +18,8 @@ use PhpMyAdmin\SqlParser\Component;
class UnionKeyword extends Component
{
/**
- * @param UnionKeyword[] $component the component to be built
- * @param array $options parameters for building
+ * @param array<UnionKeyword[]> $component the component to be built
+ * @param array $options parameters for building
*
* @return string
*/
diff --git a/src/Context.php b/src/Context.php
index 9625deb..93c1c76 100644
--- a/src/Context.php
+++ b/src/Context.php
@@ -268,7 +268,7 @@ abstract class Context
* @param string $str string to be checked
* @param bool $isReserved checks if the keyword is reserved
*
- * @return int
+ * @return int|null
*/
public static function isKeyword($str, $isReserved = false)
{
@@ -293,7 +293,7 @@ abstract class Context
*
* @param string $str string to be checked
*
- * @return int the appropriate flag for the operator
+ * @return int|null the appropriate flag for the operator
*/
public static function isOperator($str)
{
@@ -328,7 +328,7 @@ abstract class Context
* @param string $str string to be checked
* @param mixed $end
*
- * @return int the appropriate flag for the comment type
+ * @return int|null the appropriate flag for the comment type
*/
public static function isComment($str, $end = false)
{
@@ -398,7 +398,7 @@ abstract class Context
*
* @param string $str string to be checked
*
- * @return int the appropriate flag for the symbol type
+ * @return int|null the appropriate flag for the symbol type
*/
public static function isSymbol($str)
{
@@ -424,7 +424,7 @@ abstract class Context
*
* @param string $str string to be checked
*
- * @return int the appropriate flag for the string type
+ * @return int|null the appropriate flag for the string type
*/
public static function isString($str)
{
@@ -500,7 +500,7 @@ abstract class Context
* @param string $context name of the context or full class name that
* defines the context
*
- * @return string The loaded context. `null` if no context was loaded.
+ * @return string|null The loaded context. `null` if no context was loaded.
*/
public static function loadClosest($context = '')
{
@@ -555,7 +555,7 @@ abstract class Context
* @param array|string $str the string to be escaped
* @param string $quote quote to be used when escaping
*
- * @return string
+ * @return string|array
*/
public static function escape($str, $quote = '`')
{
diff --git a/src/TokensList.php b/src/TokensList.php
index 5c04ad4..4a3eec6 100644
--- a/src/TokensList.php
+++ b/src/TokensList.php
@@ -93,7 +93,7 @@ class TokensList implements \ArrayAccess
* Gets the next token. Skips any irrelevant token (whitespaces and
* comments).
*
- * @return Token
+ * @return Token|null
*/
public function getNext()
{
@@ -113,7 +113,7 @@ class TokensList implements \ArrayAccess
*
* @param int $type the type
*
- * @return Token
+ * @return Token|null
*/
public function getNextOfType($type)
{
@@ -132,7 +132,7 @@ class TokensList implements \ArrayAccess
* @param int $type the type of the token
* @param string $value the value of the token
*
- * @return Token
+ * @return Token|null
*/
public function getNextOfTypeAndValue($type, $value)
{
diff --git a/src/UtfString.php b/src/UtfString.php
index 58905f3..5127b5b 100644
--- a/src/UtfString.php
+++ b/src/UtfString.php
@@ -99,7 +99,7 @@ class UtfString implements \ArrayAccess
*
* @param int $offset the offset to be returned
*
- * @return string
+ * @return string|null
*/
public function offsetGet($offset)
{
diff --git a/src/Utils/BufferedQuery.php b/src/Utils/BufferedQuery.php
index db9c4e5..7361949 100644
--- a/src/Utils/BufferedQuery.php
+++ b/src/Utils/BufferedQuery.php
@@ -137,7 +137,7 @@ class BufferedQuery
*
* @param bool $end whether the end of the buffer was reached
*
- * @return string
+ * @return string|false
*/
public function extract($end = false)
{