Skip to content

Commit 9343877

Browse files
authored
Update examples to match spec changes
1 parent 6c0a417 commit 9343877

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

spec.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ class ClassName
542542
public function aVeryLongMethodName(
543543
ClassTypeHint $arg1,
544544
&$arg2,
545-
array $arg3 = []
545+
array $arg3 = [],
546546
) {
547547
// method body
548548
}
@@ -571,7 +571,7 @@ class ReturnTypeVariations
571571
public function anotherFunction(
572572
string $foo,
573573
string $bar,
574-
int $baz
574+
int $baz,
575575
): string {
576576
return 'foo';
577577
}
@@ -687,7 +687,7 @@ array) does not constitute splitting the argument list itself.
687687
$foo->bar(
688688
$longArgument,
689689
$longerArgument,
690-
$muchLongerArgument
690+
$muchLongerArgument,
691691
);
692692
```
693693

@@ -1044,43 +1044,43 @@ variable lists split across multiple lines.
10441044
$longArgs_noVars = function (
10451045
$longArgument,
10461046
$longerArgument,
1047-
$muchLongerArgument
1047+
$muchLongerArgument,
10481048
) {
10491049
// body
10501050
};
10511051

10521052
$noArgs_longVars = function () use (
10531053
$longVar1,
10541054
$longerVar2,
1055-
$muchLongerVar3
1055+
$muchLongerVar3,
10561056
) {
10571057
// body
10581058
};
10591059

10601060
$longArgs_longVars = function (
10611061
$longArgument,
10621062
$longerArgument,
1063-
$muchLongerArgument
1063+
$muchLongerArgument,
10641064
) use (
10651065
$longVar1,
10661066
$longerVar2,
1067-
$muchLongerVar3
1067+
$muchLongerVar3,
10681068
) {
10691069
// body
10701070
};
10711071

10721072
$longArgs_shortVars = function (
10731073
$longArgument,
10741074
$longerArgument,
1075-
$muchLongerArgument
1075+
$muchLongerArgument,
10761076
) use ($var1) {
10771077
// body
10781078
};
10791079

10801080
$shortArgs_longVars = function ($arg) use (
10811081
$longVar1,
10821082
$longerVar2,
1083-
$muchLongerVar3
1083+
$muchLongerVar3,
10841084
) {
10851085
// body
10861086
};
@@ -1097,7 +1097,7 @@ $foo->bar(
10971097
function ($arg2) use ($var1) {
10981098
// body
10991099
},
1100-
$arg3
1100+
$arg3,
11011101
);
11021102
```
11031103

@@ -1126,7 +1126,7 @@ $func = fn (int $x, int $y): int
11261126

11271127
$func = fn (
11281128
int $x,
1129-
int $y
1129+
int $y,
11301130
): int
11311131
=> $x + $y;
11321132
```

0 commit comments

Comments
 (0)