Skip to content

Commit

Permalink
EnforceReadonlyPublicPropertyRule: test for readonly class (#69)
Browse files Browse the repository at this point in the history
* EnforceReadonlyPublicPropertyRule: test for readonly class

* bump parser and phpstan to ensure readonly class support
  • Loading branch information
janedbal committed Jan 3, 2023
1 parent ab72ba8 commit 0c185ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -10,8 +10,8 @@
],
"require": {
"php": "^7.4 || ^8.0",
"nikic/php-parser": "^4.13.2",
"phpstan/phpstan": "^1.8.1"
"nikic/php-parser": "^4.14.0",
"phpstan/phpstan": "^1.8.7"
},
"require-dev": {
"editorconfig-checker/editorconfig-checker": "^10.3.0",
Expand Down
12 changes: 12 additions & 0 deletions tests/Rule/data/EnforceReadonlyPublicPropertyRule/code.php
Expand Up @@ -28,3 +28,15 @@ class MyClass {

}

readonly class MyReadonlyClass {

public ?int $foo;

public readonly int $bar;

protected int $baz;

private int $bag;

}

0 comments on commit 0c185ae

Please sign in to comment.