Skip to content

Commit 7399ee4

Browse files
authored
Merge pull request #962 from PHPCSStandards/feature/squiz-membervarspacing-add-extra-tests
Squiz/MemberVarSpacing: add extra tests
2 parents da52592 + 8d775d8 commit 7399ee4

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.1.inc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,3 +428,19 @@ class PHP84FinalProperties {
428428

429429
final private bool $finalPrivate;
430430
}
431+
432+
class MultilineCommentShouldNotBeSplitUp {
433+
// This is the first line
434+
// of a multi-line comment
435+
// which should be recognized as belonging
436+
// with the property.
437+
public $prop;
438+
439+
440+
/* This is the first line
441+
of a multi-line comment
442+
which should be recognized as belonging
443+
with the property.
444+
*/
445+
public $prop;
446+
}

src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.1.inc.fixed

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,3 +415,19 @@ class PHP84FinalProperties {
415415

416416
final private bool $finalPrivate;
417417
}
418+
419+
class MultilineCommentShouldNotBeSplitUp {
420+
421+
// This is the first line
422+
// of a multi-line comment
423+
// which should be recognized as belonging
424+
// with the property.
425+
public $prop;
426+
427+
/* This is the first line
428+
of a multi-line comment
429+
which should be recognized as belonging
430+
with the property.
431+
*/
432+
public $prop;
433+
}

src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public function getErrorList($testFile='')
8585
416 => 1,
8686
420 => 1,
8787
427 => 1,
88+
437 => 1,
89+
445 => 1,
8890
];
8991

9092
default:

0 commit comments

Comments
 (0)