File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
src/Standards/PSR12/Docs/Functions Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 7
7
<code_comparison >
8
8
<code title =" Valid: no whitespace used." >
9
9
<![CDATA[
10
- public function functionName(?string $arg1, ?int $arg2): ?string
11
- {
10
+ public function functionName(
11
+ ?string $arg1,
12
+ ?int $arg2
13
+ ): ?string {
12
14
}
13
15
]]>
14
16
</code >
15
17
<code title =" Invalid: superfluous whitespace used." >
16
18
<![CDATA[
17
- public function functionName(? string $arg1, ? int $arg2): ? string
19
+ public function functionName(
20
+ ? string $arg1,
21
+ ? int $arg2
22
+ ): ? string {
23
+ }
24
+ ]]>
25
+ </code >
26
+ </code_comparison >
27
+ <code_comparison >
28
+ <code title =" Valid: no unexpected characters." >
29
+ <![CDATA[
30
+ public function foo(?int $arg): ?string
18
31
{
19
32
}
20
33
]]>
21
34
</code >
22
35
<code title =" Invalid: unexpected characters used." >
23
36
<![CDATA[
24
- public function functionName (? /* nullable for a reason */ string $arg1 ): ?
37
+ public function bar (? /* comment */ int $arg ): ?
25
38
// nullable for a reason
26
39
string
27
40
{
You can’t perform that action at this time.
0 commit comments