Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ class ScopeKeywordSpacingSniff implements Sniff
*/
public function register()
{
$register = Tokens::$methodPrefixes;
$register[] = T_READONLY;
$register = Tokens::$methodPrefixes;
$register += Tokens::$scopeModifiers;
$register[T_READONLY] = T_READONLY;
return $register;

}//end register()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,13 @@ class FinalProperties {
final readonly public ?MyType $spacing_correct;
protected final $spacing_incorrect = 'foo';
}

class AsymVisibility {
public(set) string $asymPublic = 'hello';
public protected(set) final $asymProtected = 'hello';
private(set) public string|false $asymPrivate = 'hello';

public public(set) $asymPublicPublic = 'hello';
protected(set) public $asymPublicProtected = 'hello';
protected private(set) $asymProtectedPrivate = 'hello';
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,13 @@ class FinalProperties {
final readonly public ?MyType $spacing_correct;
protected final $spacing_incorrect = 'foo';
}

class AsymVisibility {
public(set) string $asymPublic = 'hello';
public protected(set) final $asymProtected = 'hello';
private(set) public string|false $asymPrivate = 'hello';

public public(set) $asymPublicPublic = 'hello';
protected(set) public $asymPublicProtected = 'hello';
protected private(set) $asymProtectedPrivate = 'hello';
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public function getErrorList($testFile='')
187 => 1,
188 => 1,
193 => 2,
197 => 1,
198 => 3,
199 => 2,
];

case 'ScopeKeywordSpacingUnitTest.3.inc':
Expand Down