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

Fixed the PHPCS issues for WP 6.6 #478

Merged
merged 3 commits into from
Jul 22, 2024
Merged

Fixed the PHPCS issues for WP 6.6 #478

merged 3 commits into from
Jul 22, 2024

Conversation

mchirag2002
Copy link
Contributor

@mchirag2002 mchirag2002 commented Jul 18, 2024

Description

This PR addresses the PHPCS issues which were present in the code after the updation to WordPress 6.6. Following the coding standards followed in the organization, this PR also adds exception for a PHPCS sniff for the usage of shorthand array syntax.

Technical Details

  • Updated phcps.xml to exclude the sniff Universal.Arrays.DisallowShortArraySyntax.Found
  • Resolved the error PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose from the following two files:
    • inc/traits/trait-singleton.php
    • inc/classes/class-assets.php
  • Resolved the error PSR2.Classes.ClassDeclaration.CloseBraceAfterBody from the following two files:
    • inc/traits/trait-singleton.php
    • inc/classes/class-assets.php

Checklist

  • Update the phpcs.xml file
  • Fix the PHPCS issues in the remaining codebase

Fixes/Covers issue

Fixes #468

Fixed PHPCS issues in the code files
Excluded the sniff for shorthand array syntax
@mchirag2002 mchirag2002 added the [Type] Bug It's a bug, needs a fix. label Jul 18, 2024
@mchirag2002 mchirag2002 requested review from SH4LIN and RahiDroid July 18, 2024 08:51
SH4LIN
SH4LIN previously approved these changes Jul 18, 2024
Copy link
Contributor

@SH4LIN SH4LIN left a comment

Choose a reason for hiding this comment

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

LGTM!

phpcs.xml.dist Outdated Show resolved Hide resolved
@mchirag2002 mchirag2002 merged commit ead00c3 into main Jul 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug It's a bug, needs a fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confirm compatibility with WordPress 6.6
3 participants