Skip to content

Commit cbf45ef

Browse files
committed
Merge branch 'master' into 4.x
2 parents 7f3e8f2 + a76ca58 commit cbf45ef

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected function processMemberVar(File $phpcsFile, $stackPtr)
6969
$validPrefixes[] = T_FINAL;
7070
$validPrefixes[] = T_VAR;
7171
$validPrefixes[] = T_READONLY;
72+
$validPrefixes[] = T_ABSTRACT;
7273

7374
$startOfStatement = $phpcsFile->findNext($validPrefixes, ($endOfPreviousStatement + 1), $stackPtr, false, null, true);
7475
if ($startOfStatement === false) {

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,16 @@ class AsymVisibility {
459459

460460
private(set) private bool $asymPrivate;
461461
}
462+
463+
abstract class PHP84AbstractProperties {
464+
abstract int $abstractA {get;}
465+
466+
/**
467+
* Docblock
468+
*/
469+
public abstract string $publicAbstract { set; }
470+
#[AnAttribute]
471+
abstract bool $abstractB {get;}
472+
473+
abstract protected bool $abstractProtected { set; }
474+
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,3 +446,18 @@ class AsymVisibility {
446446

447447
private(set) private bool $asymPrivate;
448448
}
449+
450+
abstract class PHP84AbstractProperties {
451+
452+
abstract int $abstractA {get;}
453+
454+
/**
455+
* Docblock
456+
*/
457+
public abstract string $publicAbstract { set; }
458+
459+
#[AnAttribute]
460+
abstract bool $abstractB {get;}
461+
462+
abstract protected bool $abstractProtected { set; }
463+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ public function getErrorList($testFile='')
9191
456 => 1,
9292
457 => 1,
9393
460 => 1,
94+
464 => 1,
95+
471 => 1,
9496
];
9597

9698
default:

0 commit comments

Comments
 (0)