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

Uses PHP8's constructor property promotion core/Command/App,/Background, and /Broadcast #38769

Conversation

fsamapoor
Copy link
Member

Following #38636, #38637, and #38638 PRs, I have made the required adjustments to the /core/Command/ namespace as well.

I figured I should split the changes into multiple PRs to make reviewing the changes easier.

This PR refactors /core/Command/App, /core/Command/Background, and /core/Command/Broadcast classes by using PHP8's constructor property promotion to remove redundant lines and make the code cleaner.

@szaimen szaimen added the 3. to review Waiting for reviews label Jun 12, 2023
@szaimen szaimen added this to the Nextcloud 28 milestone Jun 12, 2023
@szaimen szaimen requested review from nickvergessen, come-nc, a team, icewind1991 and Fenn-CS and removed request for a team June 12, 2023 15:46
ILogger $logger) {
public function __construct(
protected IJobList $jobList,
protected ILogger $logger,

Check notice

Code scanning / Psalm

DeprecatedInterface Note

Interface OCP\ILogger is marked as deprecated
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as the other PR regarding code style when only one property, otherwise good to go.

@fsamapoor fsamapoor requested a review from come-nc June 13, 2023 07:41
@artonge artonge requested a review from a team June 19, 2023 10:27
Faraz Samapoor added 2 commits June 19, 2023 12:55
 in core/Command/App, /Background, and /Broadcast classes.

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Based on:
nextcloud#38764 (comment)

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
@artonge artonge force-pushed the constructor_property_promotion_in_core_command_part6 branch from 9d86d24 to cda0f74 Compare June 19, 2023 10:55
@artonge artonge enabled auto-merge June 19, 2023 12:14
@artonge artonge merged commit d9bf410 into nextcloud:master Jun 19, 2023
37 checks passed
@fsamapoor fsamapoor deleted the constructor_property_promotion_in_core_command_part6 branch November 3, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants