-
Notifications
You must be signed in to change notification settings - Fork 875
CRM: Fix code style formatting throughout codebase #46809
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
994f99e
Update phpcs rules
haqadn d402d81
CRM: Fix code style formatting throughout codebase
haqadn 0e18678
Make comments consistent
haqadn 8a68e1e
CRM: Update phan baseline after code formatting
haqadn 77b1611
CRM: Fix indentation in comment blocks and array alignment
haqadn 95e9c32
CRM: Fix indentation mismatches in DAL files
haqadn c338adb
CRM: Fix code style spacing in DAL helper and object files
haqadn 58477f2
Merge remote-tracking branch 'origin/trunk' into fix/crm-code-style-f…
haqadn 862e903
Merge remote-tracking branch 'origin/trunk' into fix/crm-code-style-f…
haqadn ae60fc6
Restore proper icon class
haqadn 0d52fee
Keep comment formatting looking nice
haqadn 8dd81eb
Restore lowercase wordpress icon class name
haqadn 2af1dc0
Use phpcbf-only excludes for strict comparison rules
haqadn 4cc74ed
Restore strict in_array check for transactiontotal
haqadn 5e0f273
Fix empty parentheses spacing in DAL3.Helpers
haqadn 166bad2
Fix code style: tabs, braces, and alignment across CRM files
haqadn 5b1d88e
Move block comments out of function parameter lists in DAL3.Helpers
haqadn ea8eedf
Move block comments out of function parameter lists in IntegrationFuncs
haqadn 1f04172
Apply phpcbf auto-fixes and normalize indentation across CRM files
haqadn 5d4a6f8
Merge branch 'trunk' into fix/crm-code-style-formatting
haqadn 2d615f4
Update phan baseline to reflect formatting changes
haqadn a3a9c8b
Fix remaining auto-fixable PHPCS issues and suppress mixed-context vi…
haqadn fe61d3b
Use disabled()
haqadn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,26 @@ | |||||
| <!-- We'll have to update all uses in all of our paid extensions as well, any community maintained plugins, etc. --> | ||||||
| <rule ref="WordPress.NamingConventions.ValidFunctionName"> | ||||||
| <exclude name="WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid"/> | ||||||
| <exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/> | ||||||
| </rule> | ||||||
|
|
||||||
| <!-- Legacy codebase uses camelCase/PascalCase for variables and properties --> | ||||||
| <!-- Renaming would require extensive refactoring across all extensions --> | ||||||
| <rule ref="WordPress.NamingConventions.ValidVariableName"> | ||||||
| <exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/> | ||||||
| <exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase"/> | ||||||
| </rule> | ||||||
|
|
||||||
| <!-- Disable auto-fixing strict comparisons as they can change behavior --> | ||||||
| <!-- Changing == to === could break type coercion logic (e.g., '2' == 2 vs '2' === 2) --> | ||||||
| <rule ref="Universal.Operators.StrictComparisons"> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To really only disable the auto-fixing, while keeping the rule enabled,
Suggested change
|
||||||
| <exclude phpcbf-only="true" name="Universal.Operators.StrictComparisons.LooseEqual"/> | ||||||
| <exclude phpcbf-only="true" name="Universal.Operators.StrictComparisons.LooseNotEqual"/> | ||||||
| </rule> | ||||||
|
|
||||||
| <!-- Don't auto-add strict parameter to in_array() --> | ||||||
| <rule ref="WordPress.PHP.StrictInArray"> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same
Suggested change
|
||||||
| <exclude phpcbf-only="true" name="WordPress.PHP.StrictInArray.MissingTrueStrict"/> | ||||||
| </rule> | ||||||
|
|
||||||
| <rule ref="WordPress.WP.I18n"> | ||||||
|
|
@@ -30,7 +50,7 @@ | |||||
| <rule ref="Squiz.Commenting.InlineComment"> | ||||||
| <exclude name="Squiz.Commenting.InlineComment.WrongStyle"/> | ||||||
| </rule> | ||||||
|
|
||||||
| <!-- Ideally we'd just configure PHPCompatibility with the right PHP version, but it uses <config> rather than <properties>. Sigh. --> | ||||||
| <!-- So instead we have to manually disable certain sniffs. --> | ||||||
| <rule ref="./.phpcs.dir.phpcompatibility.xml" /> | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| <?php | ||
| /* | ||
| ! | ||
| * Single company view page | ||
| */ | ||
| defined( 'ZEROBSCRM_PATH' ) || exit( 0 ); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| <?php | ||
| /* | ||
| ! | ||
| * Export Page | ||
| * Jetpack CRM - https://jetpackcrm.com | ||
| */ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| <?php | ||
| /* | ||
| ! | ||
| * Admin Page: Settings: Business Info Settings | ||
| */ | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| <?php | ||
| /* | ||
| ! | ||
| * Admin Page: Settings: Company settings | ||
| */ | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| <?php | ||
| /* | ||
| ! | ||
| * Admin Page: Settings: Custom field settings | ||
| */ | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| <?php | ||
| /* | ||
| ! | ||
| * Admin Page: Settings: Field options | ||
| */ | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| <?php | ||
| /* | ||
| ! | ||
| * Admin Page: Settings: Field sorts | ||
| */ | ||
|
|
||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of existing inline
phpcs:ignores for these that are now obsolete.Also probably a bunch for the various sniffs you auto-fixed.