Skip to content

Commit b540bfc

Browse files
authored
Merge pull request #79 from ravage84/ellipsis-comments
Replace all structure body comments with simple ellipsis
2 parents 818bf42 + 63c8520 commit b540bfc

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

spec.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Foo extends Bar implements FooInterface
6565

6666
final public static function bar()
6767
{
68-
// method body
68+
// ...
6969
}
7070
}
7171

@@ -226,7 +226,7 @@ use const Another\Vendor\CONSTANT_D;
226226
*/
227227
class FooBar
228228
{
229-
// ... additional PHP code ...
229+
// ...
230230
}
231231
```
232232

@@ -250,7 +250,7 @@ And the following would not be allowed:
250250
<?php
251251

252252
use Vendor\Package\SomeNamespace\{
253-
// This has too many namespace segments to be in a group.
253+
// This has too many namespace segments to be in a group
254254
SubnamespaceOne\AnotherNamespace\ClassA,
255255
SubnamespaceOne\ClassB,
256256
ClassZ,
@@ -268,7 +268,7 @@ For example:
268268
<html>
269269
<body>
270270
<?php
271-
// ... additional PHP code ...
271+
// ...
272272
?>
273273
</body>
274274
</html>
@@ -282,7 +282,7 @@ braces and spacing:
282282

283283
```php
284284
declare(ticks=1) {
285-
// some code
285+
// ...
286286
}
287287
```
288288

@@ -332,7 +332,7 @@ use OtherVendor\OtherPackage\BazClass;
332332

333333
class ClassName extends ParentClass implements \ArrayAccess, \Countable
334334
{
335-
// constants, properties, methods
335+
// ...
336336
}
337337
```
338338

@@ -355,7 +355,7 @@ class ClassName extends ParentClass implements
355355
\Countable,
356356
\Serializable
357357
{
358-
// constants, properties, methods
358+
// ...
359359
}
360360
```
361361

@@ -494,7 +494,7 @@ class ClassName
494494
{
495495
public function fooBarBaz($arg1, &$arg2, $arg3 = [])
496496
{
497-
// method body
497+
// ...
498498
}
499499
}
500500
```
@@ -507,7 +507,7 @@ parentheses, commas, spaces, and braces:
507507

508508
function fooBarBaz($arg1, &$arg2, $arg3 = [])
509509
{
510-
// function body
510+
// ...
511511
}
512512
```
513513

@@ -551,7 +551,7 @@ class ClassName
551551
{
552552
public function foo(int $arg1, &$arg2, $arg3 = [])
553553
{
554-
// method body
554+
// ...
555555
}
556556
}
557557
```
@@ -576,7 +576,7 @@ class ClassName
576576
&$arg2,
577577
array $arg3 = [],
578578
) {
579-
// method body
579+
// ...
580580
}
581581
}
582582
```
@@ -638,7 +638,7 @@ name:
638638
```php
639639
public function process(string $algorithm, ...$parts)
640640
{
641-
// processing
641+
// ...
642642
}
643643
```
644644

@@ -648,7 +648,7 @@ there MUST NOT be any space between the two of them:
648648
```php
649649
public function process(string $algorithm, &...$parts)
650650
{
651-
// processing
651+
// ...
652652
}
653653
```
654654

@@ -683,7 +683,7 @@ abstract class ClassName
683683

684684
final public static function bar()
685685
{
686-
// method body
686+
// ...
687687
}
688688
}
689689

@@ -791,11 +791,11 @@ closing brace from the earlier body.
791791
<?php
792792

793793
if ($expr1) {
794-
// if body
794+
// ...
795795
} elseif ($expr2) {
796-
// elseif body
796+
// ...
797797
} else {
798-
// else body;
798+
// ...
799799
}
800800
```
801801

@@ -818,12 +818,12 @@ if (
818818
$expr1
819819
&& $expr2
820820
) {
821-
// if body
821+
// ...
822822
} elseif (
823823
$expr3
824824
&& $expr4
825825
) {
826-
// elseif body
826+
// ...
827827
}
828828
```
829829

@@ -833,7 +833,7 @@ A `switch` structure looks like the following. Note the placement of
833833
parentheses, spaces, and braces. The `case` statement MUST be indented once
834834
from `switch`, and the `break` keyword (or other terminating keywords) MUST be
835835
indented at the same level as the `case` body. There MUST be a comment such as
836-
`// no break` when fall-through is intentional in a non-empty `case` body.
836+
`// No break` when fall-through is intentional in a non-empty `case` body.
837837

838838
```php
839839
<?php
@@ -844,7 +844,7 @@ switch ($expr) {
844844
break;
845845
case 1:
846846
echo 'Second case, which falls through';
847-
// no break
847+
// No break
848848
case 2:
849849
case 3:
850850
case 4:
@@ -872,7 +872,7 @@ switch (
872872
$expr1
873873
&& $expr2
874874
) {
875-
// structure body
875+
// ...
876876
}
877877
```
878878

@@ -898,7 +898,7 @@ parentheses, spaces, and braces.
898898
<?php
899899

900900
while ($expr) {
901-
// structure body
901+
// ...
902902
}
903903
```
904904

@@ -916,7 +916,7 @@ while (
916916
$expr1
917917
&& $expr2
918918
) {
919-
// structure body
919+
// ...
920920
}
921921
```
922922

@@ -927,7 +927,7 @@ of parentheses, spaces, and braces.
927927
<?php
928928

929929
do {
930-
// structure body;
930+
// ...
931931
} while ($expr);
932932
```
933933

@@ -940,7 +940,7 @@ always be at the beginning or at the end of the line, not a mix of both. For exa
940940
<?php
941941

942942
do {
943-
// structure body;
943+
// ...
944944
} while (
945945
$expr1
946946
&& $expr2
@@ -956,7 +956,7 @@ spaces, and braces.
956956
<?php
957957

958958
for ($i = 0; $i < 10; $i++) {
959-
// for body
959+
// ...
960960
}
961961
```
962962

@@ -973,7 +973,7 @@ for (
973973
$i < 10;
974974
$i++
975975
) {
976-
// for body
976+
// ...
977977
}
978978
```
979979

@@ -986,7 +986,7 @@ parentheses, spaces, and braces.
986986
<?php
987987

988988
foreach ($iterable as $key => $value) {
989-
// foreach body
989+
// ...
990990
}
991991
```
992992

@@ -999,13 +999,13 @@ parentheses, spaces, and braces.
999999
<?php
10001000

10011001
try {
1002-
// try body
1002+
// ...
10031003
} catch (FirstThrowableType $e) {
1004-
// catch body
1004+
// ...
10051005
} catch (OtherThrowableType | AnotherThrowableType $e) {
1006-
// catch body
1006+
// ...
10071007
} finally {
1008-
// finally body
1008+
// ...
10091009
}
10101010
```
10111011

@@ -1095,15 +1095,15 @@ parentheses, commas, spaces, and braces:
10951095
<?php
10961096

10971097
$closureWithArgs = function ($arg1, $arg2) {
1098-
// body
1098+
// ...
10991099
};
11001100

11011101
$closureWithArgsAndVars = function ($arg1, $arg2) use ($var1, $var2) {
1102-
// body
1102+
// ...
11031103
};
11041104

11051105
$closureWithArgsVarsAndReturn = function ($arg1, $arg2) use ($var1, $var2): bool {
1106-
// body
1106+
// ...
11071107
};
11081108
```
11091109

@@ -1127,15 +1127,15 @@ $longArgs_noVars = function (
11271127
$longerArgument,
11281128
$muchLongerArgument,
11291129
) {
1130-
// body
1130+
// ...
11311131
};
11321132

11331133
$noArgs_longVars = function () use (
11341134
$longVar1,
11351135
$longerVar2,
11361136
$muchLongerVar3,
11371137
) {
1138-
// body
1138+
// ...
11391139
};
11401140

11411141
$longArgs_longVars = function (
@@ -1147,23 +1147,23 @@ $longArgs_longVars = function (
11471147
$longerVar2,
11481148
$muchLongerVar3,
11491149
) {
1150-
// body
1150+
// ...
11511151
};
11521152

11531153
$longArgs_shortVars = function (
11541154
$longArgument,
11551155
$longerArgument,
11561156
$muchLongerArgument,
11571157
) use ($var1) {
1158-
// body
1158+
// ...
11591159
};
11601160

11611161
$shortArgs_longVars = function ($arg) use (
11621162
$longVar1,
11631163
$longerVar2,
11641164
$muchLongerVar3,
11651165
) {
1166-
// body
1166+
// ...
11671167
};
11681168
```
11691169

@@ -1176,7 +1176,7 @@ in a function or method call as an argument.
11761176
$foo->bar(
11771177
$arg1,
11781178
function ($arg2) use ($var1) {
1179-
// body
1179+
// ...
11801180
},
11811181
$arg3,
11821182
);
@@ -1237,7 +1237,7 @@ If the anonymous class has no arguments, the `()` after `class` MUST be omitted.
12371237
// Brace on the same line
12381238
// No arguments
12391239
$instance = new class extends \Foo implements \HandleableInterface {
1240-
// Class content
1240+
// ...
12411241
};
12421242

12431243
// Brace on the next line
@@ -1250,7 +1250,7 @@ $instance = new class($a) extends \Foo implements
12501250
public function __construct(public int $a)
12511251
{
12521252
}
1253-
// Class content
1253+
// ...
12541254
};
12551255
```
12561256

0 commit comments

Comments
 (0)