Automattic / phpcs-neutron-standard

A set of phpcs sniffs for PHP >7 development
MIT License
94 stars 7 forks source link

DisallowGlobalFunctionsSniff: namespaced pure global functions should be allowed #35

Closed sirbrillig closed 6 years ago

sirbrillig commented 6 years ago

According to the docs,

New code MUST NOT introduce non-pure namespace functions outside of a class. For this purpose, a pure method always returns the same result for the same arguments with no side effects.

But currently DisallowGlobalFunctionsSniff reports all functions outside of a class as errors.