Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #54177, comment 3


Ignore:
Timestamp:
09/25/2021 01:47:36 AM (3 years ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54177, comment 3

    v1 v2  
    5050If there's a desire to extend this for the whole of core, I'm happy to:
    5151
    52 1. open an additional ticket (so that this one is essentially a dry-run for core) and get started with running `phpcs` with these rules added.
     521. open an additional ticket, so that this one is essentially a dry-run for core.
    53532. add scope from `private` to `protected` to `public` until all tests pass.
    54543. open a PR when this is ready for review.
     
    5858- A re-run of GitHub actions would possibly need to be forced on open PRs at the same time so that all of these can be updated before being merged.
    5959- A core merge is best done just after a major release.
     60
     61For reference, here's the `phpcs` report for these rules on the `src` directory.
     62
     63{{{#!sh
     64
     65
     66# ./vendor/squizlabs/php_codesniffer/bin/phpcs src/ --sniffs=Squiz.Scope.MethodScope,Squiz.WhiteSpace.ScopeKeywordSpacing --report=summary,source
     67
     68PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
     69----------------------------------------------------------------------
     70SOURCE                                                           COUNT
     71----------------------------------------------------------------------
     72Squiz.Scope.MethodScope.Missing                                  99
     73----------------------------------------------------------------------
     74A TOTAL OF 99 SNIFF VIOLATIONS WERE FOUND IN 1 SOURCE
     75----------------------------------------------------------------------
     76
     77}}}