craft-cpjs icon indicating copy to clipboard operation
craft-cpjs copied to clipboard

feat: add `ecs` & `phpstan` code analysis

Open khalwat opened this issue 2 years ago • 1 comments

Add ecs & phpstan code analysis

I also ran both ecs and phpstan, which cleaned up the code, and I manually fixed one error phpstan pointed out.

You can manually run either ecs or phpstan in local dev, and they will also automatically be run:

  • Whenever you push to the v3-dev branch
  • Whenever someone else does a PR

When someone does a PR, it'll look like this for them:

Screenshot 2024-03-11 at 10 30 55 PM

...and then once it has passed (or failed) it'll look like this:

Screenshot 2024-03-11 at 10 31 25 PM

khalwat avatar Mar 12 '24 02:03 khalwat

I did this only for the Craft 5 version of the plugin. If you want to backport it to Craft 4, it's the exact same everything for Craft 4.

khalwat avatar Mar 12 '24 02:03 khalwat