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

#2428 - Update WP-Coding Standards WPCS To v3 #2546

Conversation

kodinkat
Copy link
Contributor

@kodinkat
Copy link
Contributor Author

Managed to reduce ./tests/test_phpcs.sh errors; however, failing to locate suitable sniff rules to exclude the following exceptions:

  • Opening brace should be on a new line
  • There should be a comma after the last array item in a multi-line array.
  • The closing brace for the class must go on the next line after the body
  • Using short ternaries is not allowed as they are rarely used correctly
  • Function closing brace must go on the next line following the body; found 1 blank lines before brace

@kodinkat
Copy link
Contributor Author

kodinkat commented Aug 1, 2024

Exceptions still not resolved by current sniff rules:

  • Expected 1 space before opening brace; found 0
  • Expected 1 space after FUNCTION keyword; 0 found
  • Opening brace must be the last content on the line

@corsacca corsacca merged commit 1368577 into DiscipleTools:develop Aug 23, 2024
2 checks passed
micahmills added a commit that referenced this pull request Sep 13, 2024
…#2558)

* moves component services to header

* SSO: uncomment recaptcha check, save SSO methods used in user meta(#2518)

* chore: uncomment recaptcha check in backend

* feat: save a list of sign in providers

* Add color variables to css (#2516)

* add color variables to css

This allows their easy re-use within plugins

* update from style guide

* rebuild styles

* Fix errors saving dropdown option translations (#2513)

* fix parsing of option translation locale

* don't reset option label upon saving translation

* Fix translations on field option labels from being overwritten.
Fix saving custom label over default translated label.

* phpcs

---------

Co-authored-by: corsac <corsacca@gmail.com>

* Translated using Weblate (Croatian) (#2520)

Currently translated at 99.8% (1206 of 1208 strings)

Translated using Weblate (Swahili)

Currently translated at 100.0% (1208 of 1208 strings)

Translated using Weblate (Swahili)

Currently translated at 83.5% (1009 of 1208 strings)

Translated using Weblate (French (fr_FR))

Currently translated at 85.5% (1034 of 1208 strings)

Translated using Weblate (Italian (it_IT))

Currently translated at 100.0% (1208 of 1208 strings)

Translated using Weblate (Croatian)

Currently translated at 99.9% (1207 of 1208 strings)

Translated using Weblate (Bosnian (bs_BA))

Currently translated at 100.0% (1208 of 1208 strings)

Translated using Weblate (Bosnian (bs_BA))

Currently translated at 99.9% (1207 of 1208 strings)

Translated using Weblate (Bosnian (bs_BA))

Currently translated at 99.9% (1207 of 1208 strings)

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.







Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/bs_BA/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/fr_FR/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/hr/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/it_IT/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/sw/
Translation: Disciple.Tools/Disciple Tools Theme

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Dragana <celikdragana0@gmail.com>
Co-authored-by: Kyle Koval <kyle.koval@gmail.com>
Co-authored-by: Leila Mohamed <nevergvup.leila@gmail.com>
Co-authored-by: Paul Bruss <mosquitoacres@gmail.com>
Co-authored-by: Zlatko Celik <zlatko.celik@gmail.com>

* Disciple.Tools v1.64

* User Profile: Ensure user display name is maintained (#2521)

* D.T Reports: add list function to dt-reports class (#2484)

* feat: add where function to dt-reports class

* feat: return error if wrong value type is given

* feat: move value of where clause into array; refactor: where name to list

putting the value in an array will mean we can add operators and other upgrades to how the where works later

* Workflows: Ensure connection fields trigger associated workflow execution (#2522)

* Settings D.T: limit number for users listed in base user select

* Workflows: Added custom Comments action (#2517)

* Added custom Comments action to workflows

* Prevents comments from being added multiple times

* Resolved comments

* code styles fixes

* Removed comments from step 2

* Ran prettier

* Metrics - Personal - Gen-Map - Restrict To Records Responsible For (#2504)

* Ensure to only restrict to records user is responsible for

* Filter accordingly by slug & post type

* Simplified query results generation logic

* Removed unwanted write log statement

* Ensure record node shares are forced for administrators

* Access to view all records can view entire tree. Multipliers can see the name of their own record.

* #2496 - Select & Tags Cumulative Activity Metrics Charts (#2514)

* Select & tags cumulative activity metrics charts

* UI tweaks & end of time range cumulative total matches

* Improved modal count mismatches

* Added pm.meta_value group by to updated month sql

* wording

* Cleaned up stale code blocks

* Cleaned up straggling stale code blocks

* Check for create_users permission when displaying Add User submenu (#2530)

* Translated using Weblate (Swahili) (#2531)

Currently translated at 100.0% (1208 of 1208 strings)

Translated using Weblate (Italian (it_IT))

Currently translated at 100.0% (1208 of 1208 strings)

Translated using Weblate (Bosnian (bs_BA))

Currently translated at 100.0% (1208 of 1208 strings)

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.





Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/bs_BA/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/it_IT/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/sw/
Translation: Disciple.Tools/Disciple Tools Theme

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Dragana <celikdragana0@gmail.com>
Co-authored-by: Kyle Koval <kyle.koval@gmail.com>
Co-authored-by: Leila Mohamed <nevergvup.leila@gmail.com>

* Disciple.Tools v1.65.0

* Fix personal genmap access to records

* Custom password reset flow: Clear user cache when saving the reset key

* Fix email headers and login template errors (#2534)

* fix: add content-type: text/html correctly if headers is a string

fix: deal with  being a string when checking for content-type: text/html

* fix: Undefined array key 0 in login-user-manager

* phpcs

* Metrics: Collapse field selects down to a single row (#2533)

* SOO Login: fix issue where email wasn't being captured

* Metrics - Genmapper - Show Data Layers (#2515)

* Introduced data layer field filters for generational tree metrics

* Addressed sql placeholders code smells

* Ignore string array escaping

* Revised ui and data layer flow logic

* Introduced displaying of field icons

* Added switch to toggle between labels and icons

* wording

* Enforce data layer display ordering

* Hide data layer settings by default + Also display status field label

* Plus icon count for each field line + White icons with fixed size

* Ensure mdi font icons default to white

* SSO Login: setting to persist login (#2537)

* SOO Login: setting to persist login

* phpcs

* phpcs

* Metrics > Genmapper: fix icon sizing and alignment (#2539)

* Template integration in dt-modal of duplicate detected button

* Customizations: Fix tile label translations and clearing field translations (#2550)

* Customizations: Fix tile label translations and clearing field translations

* revert phpcs

* #1873 - Default Reply To On Email Notifications (#2545)

* Default reply-to on email notifications

* Wording and order

* Don't overwrite existing reply to values

* Change default email name and address

* revert phpcs

---------

Co-authored-by: corsac <corsacca@gmail.com>

* Admin Actions integration on edit page.

* Workflow action: Comment replace user or connection tokens with values (#2541)

* Comments {subassigned} functionality

* removed hardcoded {connections}

* PR cleanup/optimizations

* Copied Jon's Fixes

* Customizations: Resolved missing permissions on role updates bug (#2552)

* SSO Login: allow logging in with firebase ID when email is not provided. (#2536)

* SOO Login: allow logging in with firebase ID when email is not provided.

* phpcs

* fix typo

* #2523 - Ensure Geocoded Locations Are Copied When Transferring Contact To Another Instance (#2525)

* Ensure geocoded locations are copied when transferring contact to another instance

* Transfer additional geolocation grid meta info

* Transfer actual grid meta to be used + Avoid duplicate location_grid values

* Add by pre-defined meta grid values

* Reverted posts.php auto formatting

* Reverted contacts-transfer.php auto formatting

* Undefined error fix

* revert structure change

* allow dup locations

* Translated using Weblate (Italian (it_IT)) (#2556)

Currently translated at 100.0% (1209 of 1209 strings)

Translated using Weblate (Arabic)

Currently translated at 83.3% (1008 of 1209 strings)

Translated using Weblate (Vietnamese)

Currently translated at 100.0% (1209 of 1209 strings)

Translated using Weblate (Vietnamese)

Currently translated at 85.7% (1037 of 1209 strings)

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translated using Weblate (French (fr_FR))

Currently translated at 85.6% (1035 of 1208 strings)






Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/ar/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/fr_FR/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/it_IT/
Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/vi/
Translation: Disciple.Tools/Disciple Tools Theme

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Charlie Ritchie <ritchiecharlie@gmail.com>
Co-authored-by: Corsacca <corsacca@gmail.com>
Co-authored-by: FarahDoumani <farahdoumani@gmail.com>
Co-authored-by: Kyle Koval <kyle.koval@gmail.com>

* Disciple.Tools v1.66

* removed unwanted code and added comments

* corrected heading and styling duplicate detected

* Metrics - Personal Layers Map (#2542)

* Support record maps within personal metrics

* Embedded filter by post id sql + Split local storage cookie across menu slugs

* Updated sql to ensure only shared records are returned

* Resolved auto formatting issue

* Additional tidy-ups

* Simplified sql

* Ensure metrics is only shown for specific user roles

* Personal for all. Dynamics by permissions

* Prevent non-slug related requests

* Moved permissions check to endpoint

* Revised permission checks + Updated genmap to follow new checks

* Lists: Split By - Option To Clear Filters (#2544)

* Display current filter labels

* Deleted console logs

* Ignore sorting labels

* Support multiple split-by filters with dynamic count refreshes

* Avoid auto filter refreshes on split by option selections

* Enforce overwriting of previously selected field options

* PHPCS - Upgrade WP-Coding Standards To v3 (#2546)

* Updated to v3.1.0

* Introduced additional rules to reduce error counts

* Further reduced sniff exceptions

* Resolved remaining exceptions

* Revert "Resolved remaining exceptions"

This reverts commit f5103bb.

* fix MultiLineFunctionDeclaration errors

* remove some rules

* remove commented excludes

* enable Generic.WhiteSpace.IncrementDecrementSpacing

* enable Universal.Arrays.DuplicateArrayKey

* enable Universal.WhiteSpace.CommaSpacing

* enable NormalizedArrays.Arrays.ArrayBraceSpacing

* enable PSR2.Classes.ClassDeclaration

* enable PSR2.Files.EndFileNewline

* enable Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence

* enable PSR2.Methods.FunctionClosingBrace

* enable WordPress.DB.PreparedSQL

* enable WordPress.Security.NonceVerification

---------

Co-authored-by: corsac <corsacca@gmail.com>

* Only set D.T base email name and email address if none other is set (#2562)

* feat: add a hook when deleting a post (#2568)

* feat: add before post deleted hook (#2569)

* phpcbf

* fixes camel case error

* phpcs fix

* phpcs fixes for proper snake case

* prettier styling fixes

* gulp build files

---------

Co-authored-by: Micah Mills <micahmills@gmail.com>
Co-authored-by: squigglybob <squigglybob@users.noreply.github.com>
Co-authored-by: cairocoder01 <44169599+cairocoder01@users.noreply.github.com>
Co-authored-by: corsac <corsacca@gmail.com>
Co-authored-by: discipletoolsbot <115006603+discipletoolsbot@users.noreply.github.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Dragana <celikdragana0@gmail.com>
Co-authored-by: Kyle Koval <kyle.koval@gmail.com>
Co-authored-by: Leila Mohamed <nevergvup.leila@gmail.com>
Co-authored-by: Paul Bruss <mosquitoacres@gmail.com>
Co-authored-by: Zlatko Celik <zlatko.celik@gmail.com>
Co-authored-by: kodinkat <me@karlkatewu.com>
Co-authored-by: jlamanskygitt <125215675+jlamanskygitt@users.noreply.github.com>
Co-authored-by: brady-lamansky-gtt <125215973+brady-lamansky-gtt@users.noreply.github.com>
Co-authored-by: Charlie Ritchie <ritchiecharlie@gmail.com>
Co-authored-by: FarahDoumani <farahdoumani@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update wp-coding-standards/wpcs to v3
2 participants