-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
75 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
class Test | ||
{ | ||
var $var; | ||
public $pub; | ||
protected $prot; | ||
private $priv; | ||
} | ||
|
||
class TestSniff | ||
{ | ||
var $var; | ||
public $pub; | ||
} |
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
tests/Sniffs/Classes/data/forbiddenPublicPropertyNoErrors.php
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
tests/Sniffs/Classes/data/forbiddenPublicPropertyPromotedErrors.php
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
tests/Sniffs/Classes/data/forbiddenPublicPropertyPromotedNoErrors.php
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
tests/Sniffs/Classes/data/forbiddenPublicPropertyReadonly.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php // lint >= 8.1 | ||
|
||
class Test | ||
{ | ||
var $var; | ||
public $pub; | ||
readonly public string $rps; | ||
public readonly string $prs; | ||
public $pub2; | ||
|
||
public function __construct( | ||
public int $promoted1, | ||
readonly public string $promoted2 | ||
) | ||
{ | ||
} | ||
} | ||
|
||
class Test2 | ||
{ | ||
public function __construct(protected int $promoted1, readonly private string $promoted2) | ||
{ | ||
} | ||
} |