mi-schi / phpmd-extension

Contains extra phpmd rules from clean code book and the best practices of my experiences.
MIT License
39 stars 7 forks source link

PHP 7.4 support #10

Closed lisfox1 closed 4 years ago

lisfox1 commented 4 years ago

Using typed properties:

<?php
class User {
    public int $id;
    public string $name;
}
?>

Results in: Try to avoid public class variables. Use Getter to access the variable. It supports the principle of privacy.

mi-schi commented 4 years ago

Yes, is there a change?

mi-schi commented 4 years ago

If there is a new concept in PHP for public class members, please let me know and argument with sources. Thanks.