pluginkollektiv / cachify

Smart but efficient cache solution for WordPress. Use DB, HDD, APC or Memcached for storing your blog pages. Make WordPress faster!
https://wordpress.org/plugins/cachify/
GNU General Public License v2.0
101 stars 32 forks source link

use one-line notation for add_action calls #260

Closed stklcode closed 2 years ago

stklcode commented 2 years ago

The initialization routines got pretty long and unhandy to read with a mixture of add_* blocks and conditionals.

Re-format the code to use one-line notations which do not exceed 96 characters (effectively 102 with tab-size 4) each and compress the class by a total of ~164~ 176 lines.

pfefferle commented 2 years ago

But won't the add_action one-liners be marked as issues by PHPCS and/or auto-fixed to multi-line by PHPCBF?

stklcode commented 2 years ago

At least not with our current ruleset (which is simply <rule ref="WordPress"/>) - obviously, "quality" CI is passing.

With warnings enabled there are 27 remaining issues in class-cachify.php after auto-fixing, but add_action indentation is none of them.