Skip to content

Commit 318af74

Browse files
authored
Merge pull request #28 from KorvinSzanto/master
Update examples to match spec changes
2 parents b0f781e + 9343877 commit 318af74

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
@@ -553,7 +553,7 @@ class ClassName
553553
public function aVeryLongMethodName(
554554
ClassTypeHint $arg1,
555555
&$arg2,
556-
array $arg3 = []
556+
array $arg3 = [],
557557
) {
558558
// method body
559559
}
@@ -582,7 +582,7 @@ class ReturnTypeVariations
582582
public function anotherFunction(
583583
string $foo,
584584
string $bar,
585-
int $baz
585+
int $baz,
586586
): string {
587587
return 'foo';
588588
}
@@ -698,7 +698,7 @@ array) does not constitute splitting the argument list itself.
698698
$foo->bar(
699699
$longArgument,
700700
$longerArgument,
701-
$muchLongerArgument
701+
$muchLongerArgument,
702702
);
703703
```
704704

@@ -1065,43 +1065,43 @@ variable lists split across multiple lines.
10651065
$longArgs_noVars = function (
10661066
$longArgument,
10671067
$longerArgument,
1068-
$muchLongerArgument
1068+
$muchLongerArgument,
10691069
) {
10701070
// body
10711071
};
10721072

10731073
$noArgs_longVars = function () use (
10741074
$longVar1,
10751075
$longerVar2,
1076-
$muchLongerVar3
1076+
$muchLongerVar3,
10771077
) {
10781078
// body
10791079
};
10801080

10811081
$longArgs_longVars = function (
10821082
$longArgument,
10831083
$longerArgument,
1084-
$muchLongerArgument
1084+
$muchLongerArgument,
10851085
) use (
10861086
$longVar1,
10871087
$longerVar2,
1088-
$muchLongerVar3
1088+
$muchLongerVar3,
10891089
) {
10901090
// body
10911091
};
10921092

10931093
$longArgs_shortVars = function (
10941094
$longArgument,
10951095
$longerArgument,
1096-
$muchLongerArgument
1096+
$muchLongerArgument,
10971097
) use ($var1) {
10981098
// body
10991099
};
11001100

11011101
$shortArgs_longVars = function ($arg) use (
11021102
$longVar1,
11031103
$longerVar2,
1104-
$muchLongerVar3
1104+
$muchLongerVar3,
11051105
) {
11061106
// body
11071107
};
@@ -1118,7 +1118,7 @@ $foo->bar(
11181118
function ($arg2) use ($var1) {
11191119
// body
11201120
},
1121-
$arg3
1121+
$arg3,
11221122
);
11231123
```
11241124

@@ -1147,7 +1147,7 @@ $func = fn (int $x, int $y): int
11471147

11481148
$func = fn (
11491149
int $x,
1150-
int $y
1150+
int $y,
11511151
): int
11521152
=> $x + $y;
11531153
```

0 commit comments

Comments
 (0)