Skip to content

Commit d170d4f

Browse files
committed
Merge branch 'master' into 4.x
2 parents 2b29875 + 401a322 commit d170d4f

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function register()
6969
$targets[] = T_STATIC;
7070
$targets[] = T_READONLY;
7171
$targets[] = T_FINAL;
72+
$targets[] = T_ABSTRACT;
7273

7374
// Register function keywords to filter out param/return type declarations.
7475
$targets[] = T_FUNCTION;
@@ -137,6 +138,7 @@ public function process(File $phpcsFile, $stackPtr)
137138
|| $tokens[$stackPtr]['code'] === T_STATIC
138139
|| $tokens[$stackPtr]['code'] === T_READONLY
139140
|| $tokens[$stackPtr]['code'] === T_FINAL
141+
|| $tokens[$stackPtr]['code'] === T_ABSTRACT
140142
) {
141143
$skipOver = (Tokens::EMPTY_TOKENS + $this->propertyTypeTokens);
142144
$skipTo = $phpcsFile->findNext($skipOver, ($stackPtr + 1), null, true);

src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.1.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,8 @@ class WithAsym {
176176

177177
public protected(set) Type|NULL|bool $asym4 = TRUE;
178178
}
179+
180+
abstract class SkipOverPHP84AbstractProperties {
181+
abstract MyType|TRUE $propA {get;}
182+
protected abstract NULL|MyClass $propB {set;}
183+
}

src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.1.inc.fixed

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,8 @@ class WithAsym {
176176

177177
public protected(set) Type|NULL|bool $asym4 = true;
178178
}
179+
180+
abstract class SkipOverPHP84AbstractProperties {
181+
abstract MyType|TRUE $propA {get;}
182+
protected abstract NULL|MyClass $propB {set;}
183+
}

src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,8 @@ class WithAsym {
117117
protected(set) false|string|null $asym3 = null;
118118
public protected(set) Type|null|bool $asym4 = true;
119119
}
120+
121+
abstract class SkipOverPHP84AbstractProperties {
122+
abstract MyType|true $propA {get;}
123+
protected abstract null|MyClass $propB {set;}
124+
}

src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc.fixed

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,8 @@ class WithAsym {
117117
protected(set) false|string|null $asym3 = NULL;
118118
public protected(set) Type|null|bool $asym4 = TRUE;
119119
}
120+
121+
abstract class SkipOverPHP84AbstractProperties {
122+
abstract MyType|true $propA {get;}
123+
protected abstract null|MyClass $propB {set;}
124+
}

0 commit comments

Comments
 (0)