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.
According to the docs,
But currently
DisallowGlobalFunctionsSniff
reports all functions outside of a class as errors.