Skip to content

Commit

Permalink
NullableTypeDeclaration: fix CLI documentation
Browse files Browse the repository at this point in the history
* The line length of the code samples was too long.
* The second code sample would not be shown as it was not accompanied by a `valid` case, nor wrapped in its own `code_comparison` block.
  • Loading branch information
jrfnl committed Jan 27, 2020
1 parent bb50f79 commit ec17397
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,34 @@
<code_comparison>
<code title="Valid: no whitespace used.">
<![CDATA[
public function functionName(?string $arg1, ?int $arg2): ?string
{
public function functionName(
?string $arg1,
?int $arg2
): ?string {
}
]]>
</code>
<code title="Invalid: superfluous whitespace used.">
<![CDATA[
public function functionName(? string $arg1, ? int $arg2): ? string
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 functionName(? /* nullable for a reason */ string $arg1): ?
public function bar(? /* comment */ int $arg): ?
// nullable for a reason
string
{
Expand Down

0 comments on commit ec17397

Please sign in to comment.