You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class User {
private$id;
private$name;
publicfunction__construct(int$id, string$name) {
$this->id = $id;
$this->name = $name;
}
// getters and setters set here
}
Which can be shortened to:
class User {
publicint$id;
publicstring$name;
publicfunction__construct(int$id, string$name) {
$this->id = $id;
$this->name = $name;
}
}
We already include Generic.PHP.LowerCaseType sniff, and once we up the PHPCS version to >= 3.6.0, we should have the support for checking the typed properties in the class.
PHP 7.4 added support for typed class properties.
Which can be shortened to:
We already include
Generic.PHP.LowerCaseType
sniff, and once we up the PHPCS version to >= 3.6.0, we should have the support for checking the typed properties in the class.Refs:
Related to #764
The text was updated successfully, but these errors were encountered: