260 Commits

Author SHA1 Message Date
Larry Garfield
deb353a9db Merge pull request #129 from kenguest/master
switch case and default must not have semicolons
2026-02-18 10:15:39 -06:00
Ken Guest
42b55d9d12 Ever so small tweak to sample code 2026-02-17 11:13:02 +00:00
Ken Guest
c4ebadcc9a Add trivial body to example code 2026-02-17 11:01:18 +00:00
Ken Guest
44a464e731 Add note for new sample code re spreading a case statement over multiple lines 2026-02-12 23:20:50 +00:00
Ken Guest
64d3c26495 Updated as per PR discussions 2026-02-12 13:47:01 +00:00
Larry Garfield
8b8a57cb9a Merge pull request #136 from KorvinSzanto/feature/anonymous-class-attributes
Specify anonymous class attributes
2026-02-11 12:35:53 -06:00
Korvin Szanto
86e94c0ace Clarify the placement of the following class declaration
Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
2026-02-11 10:04:50 -08:00
Korvin Szanto
71b2c47bec Specify anonymous class attributes 2026-02-07 11:36:55 -08:00
Larry Garfield
80d7a7cd20 Merge pull request #133 from mspirkov/add-example-for-empty-closures
Add an example for closure with an empty body
2026-02-01 19:09:11 -06:00
Максим Спирков
6794b0a483 Allow 2 syntaxes 2026-01-20 23:55:20 +04:00
Maksim Spirkov
07e0467128 Update spec.md
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2026-01-15 20:06:34 +04:00
Максим Спирков
3bb12a7c21 CR fix 2026-01-15 12:19:25 +04:00
Максим Спирков
4ef68f7f30 Add an example for closure with an empty body 2026-01-07 14:52:09 +04:00
Larry Garfield
c83ab63979 Merge pull request #132 from lpd-au/pipe-operator
Include pipe operator in binary operators section
2025-12-01 14:34:28 -06:00
lpd-au
03416a4938 Include pipe examples 2025-11-30 13:49:53 +11:00
lpd-au
1c12e559ed Reorganise for clarity 2025-11-30 13:36:30 +11:00
lpd-au
e5793f134c Mention pipe operator 2025-11-30 13:25:53 +11:00
Ken Guest
49970b4fcf Reword section about colon usage in switch statement 2025-11-26 20:40:45 +00:00
Larry Garfield
a405c77f09 Merge pull request #130 from kenguest/this-standard
The PER shouldn't refer to itself as a PSR
2025-11-20 08:38:50 -06:00
Ken Guest
c5baae4567 No need for Standard to be all uppercase 2025-11-20 09:09:35 +00:00
Ken Guest
d3b3bb2caf The PER shouldn't refer to itself as a PSR 2025-11-19 22:23:16 +00:00
Ken Guest
f6126d9bfa switch case and default must not have semicolons 2025-11-19 17:38:58 +00:00
Larry Garfield
9724d445fc Merge pull request #125 from Crell/extra-link
Fix missing README link.
2025-11-10 14:31:01 -06:00
Larry Garfield
8261991ef3 Fix missing README link. 2025-11-10 14:18:44 -06:00
Larry Garfield
2d833d8388 Merge pull request #123 from DanielEScherzer/patch-2
Spec section 4: static methods should be called statically
2025-09-10 17:58:02 -05:00
Larry Garfield
e57d051a04 Merge pull request #122 from DanielEScherzer/patch-1
Spec section 4: static properties need a `$`
2025-09-10 17:57:46 -05:00
Daniel Scherzer
d26a46a318 Spec section 4: static methods should be called statically
Technically they work fine when called non-statically, but doing so is
generally discouraged
2025-09-10 15:02:44 -07:00
Daniel Scherzer
b89eef2232 Spec section 4: static properties need a $
Fix example from `new Foo()::someStaticProperty;` to
`new Foo()::$someStaticProperty;`
2025-09-10 14:59:36 -07:00
Larry Garfield
1dc452f619 Remove incorrect line from Migration Guide. 3.0.1 2025-08-23 12:05:49 -05:00
Larry Garfield
1a5a69b977 Merge pull request #118 from php-fig/Crell-patch-1
Fix renumbering
3.0.0
2025-06-16 13:05:48 -05:00
Larry Garfield
692455b030 Fix renumbering
Missed a few earlier.
2025-06-16 12:48:36 -05:00
Larry Garfield
efcc1f256e Merge pull request #117 from Crell/meta-trim
Trim out useless metadoc legacy
2025-06-11 08:07:59 -05:00
Larry Garfield
d022fcbbef Link to the new migration doc. 2025-06-10 23:20:30 -05:00
Larry Garfield
0c3248cfcf Remove old PSR-2 justifications that are no longer relevant. 2025-06-10 23:20:19 -05:00
Larry Garfield
12e50f99e4 Merge pull request #116 from Crell/3.0-changelog
3.0 changelog
2025-06-10 23:02:55 -05:00
Larry Garfield
24ec353352 Update title
Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
2025-06-07 23:12:54 -05:00
Larry Garfield
0ac5a51199 Merge pull request #115 from Crell/visibility
Clarify what visibility must be declared.
2025-06-03 12:11:40 -05:00
Larry Garfield
b6bb327a7e Spelling fix. 2025-05-31 02:29:43 -05:00
Larry Garfield
28e777e88b Add a v3 migration document. 2025-05-31 02:29:36 -05:00
Larry Garfield
4ef4f17cec Clarify what visibility must be declared. 2025-05-31 01:51:50 -05:00
Larry Garfield
859b866031 Merge pull request #113 from vdelau/lowercase_no_break
Undo capitalization of `// no break` to prevent tooling issues
2025-05-13 12:39:35 -05:00
Vincent de Lau
9e70dce39e Undo capitalization of // no break to prevent tooling issues
In [PR 79](https://github.com/php-fig/per-coding-style/pull/79) all
comments where either replaced with ellipsis or capitalized. The
`// no break` comment however is used literally in various tools and
capitalizing this might lead to tooling regressions.
2025-05-13 17:52:12 +02:00
Larry Garfield
5229526467 Merge pull request #108 from Crell/hooks
Specify hooks formatting
2025-04-22 21:31:42 -05:00
Larry Garfield
0a13031a22 Disallow wrapping in inline hook bodies. 2025-04-05 21:31:38 -05:00
Larry Garfield
e3e40370df Soften rules for short-hooks. 2025-04-05 21:30:01 -05:00
Larry Garfield
a027285bad Merge pull request #112 from devfrey/patch-1
Fix typo in paragraph about omitting parentheses
2025-03-29 00:53:55 -04:00
Larry Garfield
a8d1a28ee2 Clarify abstract properties with partial implementation. 2025-03-28 23:59:51 -04:00
Jeffrey Angenent
ee90554541 Fix typo in paragraph about omitting parentheses 2025-03-27 16:16:42 +01:00
Larry Garfield
5e2d262c6e Merge pull request #110 from KorvinSzanto/new-class-no-parenthesis
Recommend omitting wrapping parenthesis when immediately calling a method on a new instance
2025-03-26 13:46:46 -05:00
Larry Garfield
d34e77a56b Merge pull request #109 from TimWolla/patch-1
Recommend to always use `exit()` instead of `exit`
2025-01-28 20:59:22 -06:00