-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
We should add a sniff for https://www.php-fig.org/psr/psr-1/#23-side-effects given https://dekode.atlassian.net/wiki/spaces/doc/pages/1604452353/File+structure+and+naming+conventions
Note that files should either declare code, or run code, but in general, should not do both. This increases re-usability since a class will then not automatically initiate when its file is loaded up. The primary plugin or theme file should instead instantiate any classes needed to be ran.
https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR1/ruleset.xml#L24
olethomas
Metadata
Metadata
Assignees
Labels
No labels