spaze / phpstan-disallowed-calls

PHPStan rules to detect disallowed method & function calls, constant, namespace, attribute & superglobal usages
MIT License
255 stars 17 forks source link

Superglobal variable detection now checks a list of superglobals #109

Closed spaze closed 2 years ago

spaze commented 2 years ago

Change superglobal usage detection to a reusable variable detection, with hard-coded list of superglobals. The idea is that maybe one day somebody would like to detect some other kind of variables or variables in general, so this can be reused, while adding only a factory class like DisallowedSuperglobalFactory and a new service to extension.neon.

Fix #108