We're planning to show a presentation about the coding standards on Friday at 13:00.
This document includes preliminary information about the coding style additions we're going to propose.
We're following PSR-2 at the moment.
While PHP-FIG PSR-2 provides a good framework for the coding style guidelines, there are still some cases which are not covered by their rules.
E.g.:
public function logicalNot(bool $bool): bool
{
return !$bool; // valid for PSR2
}
public function logicalNot(bool $bool): bool
{
return ! $bool; // valid for PSR2
}
Inherit a more strict coding style ruleset, symfony, so that all of us meet in a common ground.
E.g.:
public function logicalNot(bool $bool): bool
{
return ! $bool; // Invalid for symfony.
}
You could check the following link to see an example that presents the most of the symfony styling rules:
https://symfony.com/doc/current/contributing/code/standards.html
You can also go to:
PHPStorm Preferences
->Editor
->Code Style
->PHP
use the Set from...
menu to
switch between popular coding style guidelines and compare them yourself.
See also: