per-coding-style
per-coding-style copied to clipboard
PER coding style
Added declaring arrays with short array syntax in Keywords and Types section with the "Short form of type keywords MUST ...".
Added section 12 specifying array use. Section 11 is used by https://github.com/php-fig/per-coding-style/pull/26. Applies guidelines like 2.6 Trailing Commas and 4.7 Method and Function Calls to array. If this PR is...
This effectively covers readonly classes in PHP 8.2, because the order of `readonly` and `abstract` is already defined. It also means any future keywords added to either can follow the...
1. Change "arguments" to "parameters" when describing the function definition. An argument is what is passed to a parameter. 2. Add a note about named args to the "calls" section....
Currently all of the PSR/PER code examples show using PHP short array syntax `$thing = [];`. PRs (ex: https://github.com/php-fig/per-coding-style/pull/18) also use short array syntax `$arr = ['a' => 'A', 'b'...
Having worked with CPP a ton in the last year and a half, I feel very strongly that we need this. The rules otherwise require wasting 2 extra lines of...
PER Coding Style allows the use of grouped import: ```php use function Foo\Bar\{baz, qux}; ``` But what about multi import statements? ```php use Foo\Bar, A\B\C; use function array_key_exists, count, in_array;...
I believe some clarification is needed about the spacing requirements around the `|` operator when used in the following two situations: * Union types * Multi-catch statements At this moment,...
We have a recommendation to use StudlyCaps (PascalCase) naming in the PER: PER > The term "StudlyCaps" in PSR-1 MUST be interpreted as PascalCase where the first letter of each...
While I like the consistency of having opening tags everywhere (as in #74), I can see it being "too much", especially for one liners. What do you think of the...