-
-
Notifications
You must be signed in to change notification settings - Fork 827
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
(NFC) Update various files to pass future civicrm/coder ruleset #13979
Conversation
Method: * Checkout latest merged branch of civicrm/coder (`8.x-2.x-civi`) * Run this command to autoclean a batch of 100 files `PG=1 SIZE=100 ; find Civi/ CRM/ api/ bin/ extern/ tests/ -name '*.php' | grep -v /examples/ | grep -v /DAO/ | sort | head -n $(( $PG * $SIZE )) | tail -n $SIZE | xargs phpcbf-civi` * Go through the diff. For anything that looks wonky, open in an editor and find a better solution Note: The automated checker makes good points about awkward indentation, but the automated cleanup often makes it worse. So that's why I have to open it up.
Method: * Checkout latest merged branch of civicrm/coder (`8.x-2.x-civi`) * Run this command to autoclean a batch of 100 files `PG=2 SIZE=100 ; find Civi/ CRM/ api/ bin/ extern/ tests/ -name '*.php' | grep -v /examples/ | grep -v /DAO/ | sort | head -n $(( $PG * $SIZE )) | tail -n $SIZE | xargs phpcbf-civi` * Go through the diff. For anything that looks wonky, open in an editor and find a better solution. Note: The automated checker makes good points about awkward indentation, but the automated cleanup often makes it worse. So that's why I have to open it up.
(Standard links)
|
@@ -30,7 +30,6 @@ | |||
* @copyright CiviCRM LLC (c) 2004-2019 | |||
*/ | |||
|
|||
use Civi\ActionSchedule\RecipientBuilder; |
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.
@totten this is an interesting one
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.
Agree. I opened that file to double-check references, and it seemed OK without the use
statement. Also, CRM_Activity_ActionMappingTest
, has coverage of this file. (There was an @see
, but that worked with or without the use
.)
This looks good to me merging |
Overview
There are pending updates to the
civicrm/coder
ruleset which would add a large batch of style issues. This pays down a little of that debt in advance.NOTE: This builds on #13978, which should be probably merged first.
Method
8.x-2.x-civi
; aka503b3f4d91b4f37bf6004c5e15e3beb37fed6c6b
)PG=2 SIZE=100 ; find Civi/ CRM/ api/ bin/ extern/ tests/ -name '*.php' | grep -v /examples/ | grep -v /DAO/ | sort | head -n $(( $PG * $SIZE )) | tail -n $SIZE | xargs phpcbf-civi
Note: The automated checker makes good points about awkward indentation, but the automated cleanup often makes it worse. So that's why I have to open it up.
Note: So far, I've observed that ~33% of scanned files actually raise issues. Processing a batch of 100 files per above takes me about 20-30min.