Skip to content

Commit 9739e29

Browse files
committed
PER CS 3.0: 5. Control Structures
1 parent 37be691 commit 9739e29

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/Standards/PER-CS3.0/ruleset.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,34 +347,39 @@
347347
<!-- The keyword elseif SHOULD be used instead of else if so that all control keywords look like single words. -->
348348
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
349349

350-
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. The closing parenthesis and opening brace MUST be placed together on their own line with one space between them. Boolean operators between conditions MUST always be at the beginning or at the end of the line, not a mix of both. -->
350+
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. The closing parenthesis and opening brace MUST be placed together on their own line with one space between them. Boolean operators between conditions MUST always be at the beginning. -->
351351
<!-- checked by PSR12.ControlStructures.ControlStructureSpacing -->
352352
<!-- checked by PSR12.ControlStructures.BooleanOperatorPlacement -->
353353
<!-- checked by Squiz.ControlStructures.ControlSignature -->
354+
<!--todo-->
354355

355-
<!-- 5.2 switch, case -->
356+
<!-- 5.2 switch, case, match -->
356357

357358
<!-- The case statement MUST be indented once from switch, and the break keyword (or other terminating keywords) MUST be indented at the same level as the case body. There MUST be a comment such as // no break when fall-through is intentional in a non-empty case body. -->
358359
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
359360

360-
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. The closing parenthesis and opening brace MUST be placed together on their own line with one space between them. Boolean operators between conditions MUST always be at the beginning or at the end of the line, not a mix of both. -->
361+
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. The closing parenthesis and opening brace MUST be placed together on their own line with one space between them. Boolean operators between conditions MUST always be at the beginning. -->
361362
<!-- checked by PSR12.ControlStructures.ControlStructureSpacing -->
362363
<!-- checked by PSR12.ControlStructures.BooleanOperatorPlacement -->
363364
<!-- checked by Squiz.ControlStructures.ControlSignature -->
365+
<!--todo-->
366+
<!-- Similarly, a match expression looks like the following. Note the placement of parentheses, spaces, and braces. todo check and remove this line -->
364367

365368
<!-- 5.3.1 while -->
366369

367-
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. The closing parenthesis and opening brace MUST be placed together on their own line with one space between them. Boolean operators between conditions MUST always be at the beginning or at the end of the line, not a mix of both. -->
370+
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. The closing parenthesis and opening brace MUST be placed together on their own line with one space between them. Boolean operators between conditions MUST always be at the beginning. -->
368371
<!-- checked by PSR12.ControlStructures.ControlStructureSpacing -->
369372
<!-- checked by PSR12.ControlStructures.BooleanOperatorPlacement -->
370373
<!-- checked by Squiz.ControlStructures.ControlSignature -->
374+
<!--todo-->
371375

372376
<!-- 5.3.2 do while -->
373377

374-
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. Boolean operators between conditions MUST always be at the beginning or at the end of the line, not a mix of both. -->
378+
<!-- Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. When doing so, the first condition MUST be on the next line. Boolean operators between conditions MUST always be at the beginning. -->
375379
<!-- checked by PSR12.ControlStructures.ControlStructureSpacing -->
376380
<!-- checked by PSR12.ControlStructures.BooleanOperatorPlacement -->
377381
<!-- checked by Squiz.ControlStructures.ControlSignature -->
382+
<!--todo-->
378383

379384
<!-- 5.4 for -->
380385

0 commit comments

Comments
 (0)