31
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-09-28 04:59:04 +00:00

fix Joomla codestyle

This commit is contained in:
Denis Ryabov 2021-04-04 15:06:48 +03:00
parent 9e2c702b6b
commit 37e563b14b

View File

@ -74,7 +74,7 @@ class JedcheckerRulesJexec extends JEDcheckerRule
*/
public function check()
{
$this->init_jexec();
$this->initJexec();
// Find all php files of the extension
$files = $this->files($this->basedir);
@ -100,16 +100,16 @@ class JedcheckerRulesJexec extends JEDcheckerRule
*/
protected function find($file)
{
// load file and strip comments
// Load file and strip comments
$content = php_strip_whitespace($file);
// skip empty files
// Skip empty files
if ($content === '' || preg_match('#^<\?php\s+$#', $content))
{
return true;
}
// check guards
// Check guards
if (preg_match($this->regex, $content))
{
return true;
@ -119,11 +119,11 @@ class JedcheckerRulesJexec extends JEDcheckerRule
}
/**
* Prepare regexp aforehand
* Prepare regexps aforehand
*
* @return void
*/
protected function init_jexec()
protected function initJexec()
{
// Generate regular expression to match JEXEC quard
$defines = $this->params->get('constants');