PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml

Recommend this page to a friend!
  Classes of milenmk   Simple PHP Password Manager   vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Simple PHP Password Manager
Application to store and retrieve user password
Author: By
Last change:
Date: 1 year ago
Size: 1,046 bytes
 

Contents

Class file image Download
<documentation title="Nullable Type Declarations Functions"> <standard> <![CDATA[ In nullable type declarations there MUST NOT be a space between the question mark and the type. ]]> </standard> <code_comparison> <code title="Valid: no whitespace used."> <![CDATA[ public function functionName( ?string $arg1, ?int $arg2 ): ?string { } ]]> </code> <code title="Invalid: superfluous whitespace used."> <![CDATA[ public function functionName( ? string $arg1, ? int $arg2 ): ? string { } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: no unexpected characters."> <![CDATA[ public function foo(?int $arg): ?string { } ]]> </code> <code title="Invalid: unexpected characters used."> <![CDATA[ public function bar(? /* comment */ int $arg): ? // nullable for a reason string { } ]]> </code> </code_comparison> </documentation>