class
Analyzer::Php::Laminas
- Analyzer::Php::Laminas
- Analyzer::Php::PhpEngine
- Analyzer
- Reference
- Object
Defined in:
analyzer/analyzers/php/laminas.crConstant Summary
-
HTTP_METHODS =
["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"] -
NAMESPACE_MARKER_RE =
/Laminas\\|Zend\\|Mezzio\\/ -
Precompiled once at load: the three namespace markers used to be three separate
String#includes?scans of the whole file ORed together. Crystal'sString#includes?is measurably slower than a single precompiledRegex#matches?call, and this runs on every.phpfile fed into the analyzer during a project-wide scan. -
PARAM_PATTERNS =
[{/->getQueryParams\s*\(\s*\)\s*\[\s*['"]([^'"]+)['"]\s*\]/, "query"}, {/->getParsedBody\s*\(\s*\)\s*\[\s*['"]([^'"]+)['"]\s*\]/, "form"}, {/->getUploadedFiles\s*\(\s*\)\s*\[\s*['"]([^'"]+)['"]\s*\]/, "form"}, {/->getHeaderLine\s*\(\s*['"]([^'"]+)['"]\s*\)/, "header"}, {/->getHeader\s*\(\s*['"]([^'"]+)['"]\s*\)/, "header"}, {/->getCookieParams\s*\(\s*\)\s*\[\s*['"]([^'"]+)['"]\s*\]/, "cookie"}]