e107_handlers/shortcode_handler.php
Consider simplifying this complex logical expression. Open
Open
if(empty($code)
|| empty($this->editableCodes)
|| empty($this->editableCodes['shortcodes'][$lcode])
|| !isset($this->editableCodes['perms'])
|| empty($this->editableCodes['table'])
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return '';
Avoid too many return
statements within this method. Open
Open
return $matches[0];
Avoid too many return
statements within this method. Open
Open
return isset($ret) ? $ret: '';
Returning type null
but getScObject()
is declared to return \e_shortcode
Open
Open
if(trim($className)==""){ return null; }
- Exclude checks
Returning type null
but initShortcodeClass()
is declared to return \e_shortcode
Open
Open
return null;
- Exclude checks
Returning type null
but getScObject()
is declared to return \e_shortcode
Open
Open
return null;
- Exclude checks
Argument 1 (object)
is null
but \method_exists()
takes object|string
Open
Open
if($this->editableActive && method_exists($this->addedCodes, 'editable'))
- Exclude checks
Argument 1 (object)
is null
but \get_class()
takes object
Open
Open
$_class = get_class($this->addedCodes); // "(class loaded)"; // debug.
- Exclude checks
Invalid offset "shortcodes"
of array type array{}
Open
Open
$container = empty($this->editableCodes['shortcodes'][$lcode]['container']) ? 'span' : $this->editableCodes['shortcodes'][$lcode]['container'];
- Exclude checks
Returning type ?string
but getWrapperID()
is declared to return null
Open
Open
return $this->wrapper;
- Exclude checks
Assigning string
to property but \e_parse_shortcode->nowrap
is false
Open
Open
$this->nowrap = $code;
- Exclude checks
Call to deprecated function \getperms()
defined at /code/class2.php:1322
Open
Open
|| !getperms($this->editableCodes['perms'])
- Exclude checks
Call to method getVars
on non-class type null
Open
Open
$var = $this->addedCodes->getVars();
- Exclude checks
Argument 2 (search)
is null
but \array_key_exists()
takes array
Open
Open
elseif(is_array($this->addedCodes) && array_key_exists($code, $this->addedCodes)) // Its array-based shortcode. Load the code for evaluation later.
- Exclude checks
Invalid offset "pid"
of array type array{}
Open
Open
$pid = $this->editableCodes['pid'];
- Exclude checks
Call to method getScVar
on non-class type null
Open
Open
$var = $this->addedCodes->getScVar($varID);
- Exclude checks
Argument 1 (filename)
is ?string
but \is_readable()
takes string
Open
Open
if (is_readable($path))
- Exclude checks
Argument 1 (object)
is null
but \method_exists()
takes object|string
Open
Open
if(method_exists($this->addedCodes, 'wrapper'))
- Exclude checks
Call to method editable
on non-class type null
Open
Open
$this->editableCodes = $this->addedCodes->editable();
- Exclude checks
Argument 1 (object)
is null
but \method_exists()
takes object|string
Open
Open
if((E107_DBG_BBSC || E107_DBG_SC) && isset($this->addonOverride[$_method]) && is_object($this->addedCodes) && method_exists($this->addedCodes, $_method))
- Exclude checks
Call to method wrapper
on non-class type null
Open
Open
$tmpWrap = e107::templateWrapper($this->addedCodes->wrapper());
- Exclude checks
Call to method getWrapperID
on non-class type null
Open
Open
$this->wrapper = $this->addedCodes->getWrapperID();
- Exclude checks
Assigning array
to property but \e_parse_shortcode->addedCodes
is null
Open
Open
$this->addedCodes = &$extraCodes;
- Exclude checks
Argument 1 (object)
is null
but \get_class()
takes object
Open
Open
$debugArr = array('class_original'=>get_class($this->addedCodes), 'class_override'=>$this->addonOverride[$_method], 'function'=>$_method);
- Exclude checks
Argument 3 (fullShortcodeKey)
is ?string
but \e_parse_shortcode::makeWrapper()
takes string
defined at /code/e107_handlers/shortcode_handler.php:1503
Open
Open
$ret = $this->makeWrapper($ret, $code, $fullShortcodeKey, $sc_mode);
- Exclude checks
Invalid offset "vars"
of array type array{}
Open
Open
$varID = $this->editableCodes['vars'];
- Exclude checks
Argument 1 (eVars)
is \e_object|\e_vars|string
but \e_shortcode::setParserVars()
takes array
defined at /code/e107_handlers/shortcode_handler.php:1808
Open
Open
return $this->setParserVars($eVars);
- Exclude checks
Assigning object
to property but \e_parse_shortcode->addedCodes
is null
Open
Open
$this->addedCodes = &$extraCodes;
- Exclude checks
Assigning null
to property but \e_parse_shortcode->debug_legacy
is array{}
Open
Open
$this->debug_legacy = null;
- Exclude checks
Invalid offset "perms"
of array type array{}
Open
Open
|| !getperms($this->editableCodes['perms'])
- Exclude checks
Assigning string
to property but \e_parse_shortcode->nowrap
is false
Open
Open
$this->nowrap = $code;
- Exclude checks
Invalid offset "shortcodes"
of array type array{}
Open
Open
|| empty($this->editableCodes['shortcodes'][$lcode]['field'])
- Exclude checks
Invalid offset "perms"
of array type array{}
Open
Open
if(isset($this->editableCodes['perms']) && getperms($this->editableCodes['perms']))
- Exclude checks
Call to deprecated function \getperms()
defined at /code/class2.php:1322
Open
Open
if(isset($this->editableCodes['perms']) && getperms($this->editableCodes['perms']))
- Exclude checks
Argument 1 (object)
is null
but \method_exists()
takes object|string
Open
Open
if (!isset($this->addonOverride[$_method]) && is_object($this->addedCodes) && method_exists($this->addedCodes, $_method)) //It is class-based batch shortcode. Class already loaded; call the method
- Exclude checks
Invalid offset "shortcodes"
of array type array{}
Open
Open
|| empty($this->editableCodes['shortcodes'][$lcode])
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string mod':
after string,
did not see an element name (will guess based on comment order) Open
Open
* @param string mod
- Exclude checks
Returning type null
but loadThemeShortcodes()
is declared to return \e_parse_shortcode
Open
Open
return null;
- Exclude checks