Skip to content

Commit

Permalink
Docs: update "nullable_type" comments to clarify meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Jul 17, 2020
1 parent 6b3bbef commit 38ad2b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions PHPCSUtils/BackCompat/BCFile.php
Expand Up @@ -204,7 +204,8 @@ public static function getDeclarationName(File $phpcsFile, $stackPtr)
* // or FALSE if there is no type hint.
* 'type_hint_end_token' => integer, // The stack pointer to the end of the type hint
* // or FALSE if there is no type hint.
* 'nullable_type' => boolean, // TRUE if the var type is nullable.
* 'nullable_type' => boolean, // TRUE if the var type is preceded by the nullability
* // operator.
* 'comma_token' => integer, // The stack pointer to the comma after the param
* // or FALSE if this is the last param.
* )
Expand Down Expand Up @@ -503,7 +504,8 @@ public static function getMethodParameters(File $phpcsFile, $stackPtr)
* 'return_type' => '', // The return type of the method.
* 'return_type_token' => integer, // The stack pointer to the start of the return type
* // or FALSE if there is no return type.
* 'nullable_return_type' => false, // TRUE if the return type is nullable.
* 'nullable_return_type' => false, // TRUE if the return type is preceded by
* // the nullability operator.
* 'is_abstract' => false, // TRUE if the abstract keyword was found.
* 'is_final' => false, // TRUE if the final keyword was found.
* 'is_static' => false, // TRUE if the static keyword was found.
Expand Down Expand Up @@ -712,7 +714,8 @@ public static function getMethodProperties(File $phpcsFile, $stackPtr)
* // or FALSE if there is no type.
* 'type_end_token' => integer, // The stack pointer to the end of the type
* // or FALSE if there is no type.
* 'nullable_type' => boolean, // TRUE if the type is nullable.
* 'nullable_type' => boolean, // TRUE if the type is preceded by the
* // nullability operator.
* );
* ```
*
Expand Down
6 changes: 4 additions & 2 deletions PHPCSUtils/Utils/FunctionDeclarations.php
Expand Up @@ -195,7 +195,8 @@ public static function getName(File $phpcsFile, $stackPtr)
* // or FALSE if there is no return type.
* 'return_type_end_token' => integer, // The stack pointer to the end of the return type
* // or FALSE if there is no return type.
* 'nullable_return_type' => false, // TRUE if the return type is nullable.
* 'nullable_return_type' => false, // TRUE if the return type is preceded
* // by the nullability operator.
* 'is_abstract' => false, // TRUE if the abstract keyword was found.
* 'is_final' => false, // TRUE if the final keyword was found.
* 'is_static' => false, // TRUE if the static keyword was found.
Expand Down Expand Up @@ -361,7 +362,8 @@ public static function getProperties(File $phpcsFile, $stackPtr)
* // or FALSE if there is no type hint.
* 'type_hint_end_token' => integer, // The stack pointer to the end of the type hint
* // or FALSE if there is no type hint.
* 'nullable_type' => boolean, // TRUE if the var type is nullable.
* 'nullable_type' => boolean, // TRUE if the var type is preceded by the nullability
* // operator.
* 'comma_token' => integer, // The stack pointer to the comma after the param
* // or FALSE if this is the last param.
* )
Expand Down
3 changes: 2 additions & 1 deletion PHPCSUtils/Utils/Variables.php
Expand Up @@ -104,7 +104,8 @@ class Variables
* // or FALSE if there is no type.
* 'type_end_token' => integer, // The stack pointer to the end of the type
* // or FALSE if there is no type.
* 'nullable_type' => boolean, // TRUE if the type is nullable.
* 'nullable_type' => boolean, // TRUE if the type is preceded by the
* // nullability operator.
* );
* ```
*
Expand Down

0 comments on commit 38ad2b0

Please sign in to comment.