Skip to content

Commit 3129c88

Browse files
committed
Fix phpdoc using phpstan level 3
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 365f758 commit 3129c88

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

src/Components/DataType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function __construct(
9494
* @param TokensList $list the list of tokens that are being parsed
9595
* @param array $options parameters for parsing
9696
*
97-
* @return DataType
97+
* @return DataType|null
9898
*/
9999
public static function parse(Parser $parser, TokensList $list, array $options = array())
100100
{

src/Components/Expression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function __construct($database = null, $table = null, $column = null, $al
153153
* @param TokensList $list the list of tokens that are being parsed
154154
* @param array $options parameters for parsing
155155
*
156-
* @return Expression
156+
* @return Expression|null
157157
*/
158158
public static function parse(Parser $parser, TokensList $list, array $options = array())
159159
{

src/Components/IntoKeyword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class IntoKeyword extends Component
118118
* @param array $columns column list of destination
119119
* @param array $values selected fields
120120
* @param OptionsArray $fields_options options for FIELDS/COLUMNS keyword
121-
* @param OptionsArray $fields_keyword options for OPTINOS keyword
121+
* @param bool $fields_keyword options for OPTIONS keyword
122122
*/
123123
public function __construct(
124124
$type = null,

src/Components/UnionKeyword.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
class UnionKeyword extends Component
1919
{
2020
/**
21-
* @param UnionKeyword[] $component the component to be built
22-
* @param array $options parameters for building
21+
* @param array<UnionKeyword[]> $component the component to be built
22+
* @param array $options parameters for building
2323
*
2424
* @return string
2525
*/

src/Context.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ abstract class Context
268268
* @param string $str string to be checked
269269
* @param bool $isReserved checks if the keyword is reserved
270270
*
271-
* @return int
271+
* @return int|null
272272
*/
273273
public static function isKeyword($str, $isReserved = false)
274274
{
@@ -293,7 +293,7 @@ public static function isKeyword($str, $isReserved = false)
293293
*
294294
* @param string $str string to be checked
295295
*
296-
* @return int the appropriate flag for the operator
296+
* @return int|null the appropriate flag for the operator
297297
*/
298298
public static function isOperator($str)
299299
{
@@ -328,7 +328,7 @@ public static function isWhitespace($str)
328328
* @param string $str string to be checked
329329
* @param mixed $end
330330
*
331-
* @return int the appropriate flag for the comment type
331+
* @return int|null the appropriate flag for the comment type
332332
*/
333333
public static function isComment($str, $end = false)
334334
{
@@ -398,7 +398,7 @@ public static function isNumber($str)
398398
*
399399
* @param string $str string to be checked
400400
*
401-
* @return int the appropriate flag for the symbol type
401+
* @return int|null the appropriate flag for the symbol type
402402
*/
403403
public static function isSymbol($str)
404404
{
@@ -424,7 +424,7 @@ public static function isSymbol($str)
424424
*
425425
* @param string $str string to be checked
426426
*
427-
* @return int the appropriate flag for the string type
427+
* @return int|null the appropriate flag for the string type
428428
*/
429429
public static function isString($str)
430430
{
@@ -500,7 +500,7 @@ public static function load($context = '')
500500
* @param string $context name of the context or full class name that
501501
* defines the context
502502
*
503-
* @return string The loaded context. `null` if no context was loaded.
503+
* @return string|null The loaded context. `null` if no context was loaded.
504504
*/
505505
public static function loadClosest($context = '')
506506
{
@@ -555,7 +555,7 @@ public static function setMode($mode = '')
555555
* @param array|string $str the string to be escaped
556556
* @param string $quote quote to be used when escaping
557557
*
558-
* @return string
558+
* @return string|array
559559
*/
560560
public static function escape($str, $quote = '`')
561561
{

src/TokensList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function add(Token $token)
9393
* Gets the next token. Skips any irrelevant token (whitespaces and
9494
* comments).
9595
*
96-
* @return Token
96+
* @return Token|null
9797
*/
9898
public function getNext()
9999
{
@@ -113,7 +113,7 @@ public function getNext()
113113
*
114114
* @param int $type the type
115115
*
116-
* @return Token
116+
* @return Token|null
117117
*/
118118
public function getNextOfType($type)
119119
{
@@ -132,7 +132,7 @@ public function getNextOfType($type)
132132
* @param int $type the type of the token
133133
* @param string $value the value of the token
134134
*
135-
* @return Token
135+
* @return Token|null
136136
*/
137137
public function getNextOfTypeAndValue($type, $value)
138138
{

src/UtfString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function offsetExists($offset)
9999
*
100100
* @param int $offset the offset to be returned
101101
*
102-
* @return string
102+
* @return string|null
103103
*/
104104
public function offsetGet($offset)
105105
{

src/Utils/BufferedQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function setDelimiter($delimiter)
137137
*
138138
* @param bool $end whether the end of the buffer was reached
139139
*
140-
* @return string
140+
* @return string|false
141141
*/
142142
public function extract($end = false)
143143
{

0 commit comments

Comments
 (0)