You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR1/ruleset.xml#L24
The text was updated successfully, but these errors were encountered: