Skip to content
New issue

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

feat: Add rule for having one promoted property per line in constructor #31

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Sep 18, 2024

This will help especially when using rector to add promoted properties because it makes sure they are each on their own lines.

Example diff from the changes:

 
diff --git a/apps/dav/lib/CalDAV/TimezoneService.php b/apps/dav/lib/CalDAV/TimezoneService.php
index 93f19be1b55..a7709bde0f9 100644
--- a/apps/dav/lib/CalDAV/TimezoneService.php
+++ b/apps/dav/lib/CalDAV/TimezoneService.php
@@ -20,9 +20,11 @@ use function array_reduce;
 
 class TimezoneService {
 
-       public function __construct(private IConfig $config,
+       public function __construct(
+               private IConfig $config,
                private PropertyMapper $propertyMapper,
-               private IManager $calendarManager) {
+               private IManager $calendarManager,
+       ) {
        }

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc self-assigned this Sep 18, 2024
…ameters

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc added the enhancement New feature or request label Sep 18, 2024
@come-nc come-nc marked this pull request as ready for review September 18, 2024 10:47
@ChristophWurst ChristophWurst merged commit 233bb15 into master Sep 18, 2024
2 checks passed
@ChristophWurst ChristophWurst deleted the enh/break-promoted-properties-on-multiline branch September 18, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants