mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-02-14 07:10:21 +00:00
add support of "use function" in JEXEC rule
This commit is contained in:
parent
c897c6fd17
commit
109bffc1f9
@ -153,7 +153,7 @@ class JedcheckerRulesJexec extends JEDcheckerRule
|
||||
. '<\?php\s+' // there is an opening php tag
|
||||
. '(?:declare ?\(strict_types ?= ?1 ?\) ?; ?)?' // optionally followed by declare(strict_types=1) directive
|
||||
. '(?:namespace [0-9A-Za-z_\\\\]+ ?; ?)?' // optionally followed by namespace directive
|
||||
. '(?:use [0-9A-Za-z_\\\\]+ ?(?:as [0-9A-Za-z_]+ ?)?; ?)*' // optionally followed by use directives
|
||||
. '(?:use (?:function )?[0-9A-Za-z_\\\\]+ ?(?:as [0-9A-Za-z_]+ ?)?; ?)*' // optionally followed by use directives
|
||||
. '\\\\?defined ?\( ?' // followed by defined test
|
||||
. '([\'"])(?:' . implode('|', $defines) . ')\1' // of any of given constant
|
||||
. ' ?\) ?(?:or |\|\| ?)(?:die|exit)\b' // or exit
|
||||
|
Loading…
x
Reference in New Issue
Block a user