From 109ad45ba32998d6a08fe5da35f14550c7a4f02f Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Wed, 27 May 2026 13:15:12 +0000 Subject: [PATCH] Add Section 4 to the PER-CS 1.0 to 2.0 migration guide PER-CS 2.0 added a new normative rule to Section 4 about abbreviating the body of a class with no additional declarations. The rule is not currently documented in the migration guide. This commit adds the missing entry. --- migration-2.0.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/migration-2.0.md b/migration-2.0.md index 2b14f0d..8f3ed55 100644 --- a/migration-2.0.md +++ b/migration-2.0.md @@ -40,6 +40,15 @@ function beep( } ``` +## [Section 4 - Classes, Properties, and Methods](https://www.php-fig.org/per/coding-style/#4-classes-properties-and-methods) + +A new rule was added stating that if a class contains no additional declarations, then the body of the class SHOULD be abbreviated as `{}` and placed on the same line as the previous symbol, separated by a space. + +```php +