We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As far I see, most of the commonly accepted order of public, protected, private in PHP is:
public $public = 'Public'; protected $protected = 'Protected'; private $private = 'Private';
Or
public function MyPublic() { } protected function MyProtected() { } private function MyPrivate() { }
(see also https://www.php.net/manual/en/language.oop5.visibility.php)
However WPPB does this exactly the other way around. Let's look at https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/blob/master/plugin-name/includes/class-plugin-name.php for example. It first declares public constructor, then it declares private and protected methods, then the public ones.
Why this discrepancy from mainstream?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As far I see, most of the commonly accepted order of public, protected, private in PHP is:
Or
(see also https://www.php.net/manual/en/language.oop5.visibility.php)
However WPPB does this exactly the other way around.
Let's look at https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/blob/master/plugin-name/includes/class-plugin-name.php for example.
It first declares public constructor, then it declares private and protected methods, then the public ones.
Why this discrepancy from mainstream?
The text was updated successfully, but these errors were encountered: