Skip to content

Commit

Permalink
Fix phpdoc using phpstan level 3
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Dec 31, 2019
1 parent 365f758 commit 3129c88
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/Components/DataType.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function __construct(
* @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())
{
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function __construct($database = null, $table = null, $column = null, $al
* @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())
{
Expand Down
2 changes: 1 addition & 1 deletion src/Components/IntoKeyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/Components/UnionKeyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
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
*/
Expand Down
14 changes: 7 additions & 7 deletions src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -293,7 +293,7 @@ public static function isKeyword($str, $isReserved = false)
*
* @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)
{
Expand Down Expand Up @@ -328,7 +328,7 @@ public static function isWhitespace($str)
* @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)
{
Expand Down Expand Up @@ -398,7 +398,7 @@ public static function isNumber($str)
*
* @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)
{
Expand All @@ -424,7 +424,7 @@ public static function isSymbol($str)
*
* @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)
{
Expand Down Expand Up @@ -500,7 +500,7 @@ public static function load($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 = '')
{
Expand Down Expand Up @@ -555,7 +555,7 @@ public static function setMode($mode = '')
* @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 = '`')
{
Expand Down
6 changes: 3 additions & 3 deletions src/TokensList.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function add(Token $token)
* Gets the next token. Skips any irrelevant token (whitespaces and
* comments).
*
* @return Token
* @return Token|null
*/
public function getNext()
{
Expand All @@ -113,7 +113,7 @@ public function getNext()
*
* @param int $type the type
*
* @return Token
* @return Token|null
*/
public function getNextOfType($type)
{
Expand All @@ -132,7 +132,7 @@ public function getNextOfType($type)
* @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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/UtfString.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function offsetExists($offset)
*
* @param int $offset the offset to be returned
*
* @return string
* @return string|null
*/
public function offsetGet($offset)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/BufferedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function setDelimiter($delimiter)
*
* @param bool $end whether the end of the buffer was reached
*
* @return string
* @return string|false
*/
public function extract($end = false)
{
Expand Down

0 comments on commit 3129c88

Please sign in to comment.