e107_handlers/language_class.php
Consider simplifying this complex logical expression. Open
Open
if(defined('e_PAGE_LANGUAGE') && ($detect_language = $this->isValid(e_PAGE_LANGUAGE))) // page specific override.
{
$doNothing = '';
// Do nothing as $detect_language is set.
}
Avoid too many return
statements within this method. Open
Open
return false;
Returning type object|string
but isValid()
is declared to return false
Open
Open
return $lang;
- Exclude checks
Reference to undeclared constant \e_PAGE_LANGUAGE
Open
Open
if(defined('e_PAGE_LANGUAGE') && ($detect_language = $this->isValid(e_PAGE_LANGUAGE))) // page specific override.
- Exclude checks
Reference to undeclared property \language->_select_array
Open
Open
return $this->_select_array;
- Exclude checks
Argument 2 (value)
is false
but \setcookie()
takes string
Open
Open
setcookie('e107_language', $this->detect, time() + 86400, e_HTTP);
- Exclude checks
Reference to undeclared property \language->_select_array
Open
Open
$this->_select_array = array();
- Exclude checks
Default value for object
$lang
can't be string
Open
Open
function isValid($lang='')
- Exclude checks
Argument 1 (lang)
is false
but \language::isValid()
takes object|string
defined at /code/e107_handlers/language_class.php:278
Open
Open
if(!$session->has('e_language') || (($session->get('e_language') != $this->detect) && $this->isValid($this->detect)))
- Exclude checks
Reference to undeclared property \language->_select_array
Open
Open
$this->_select_array[$this->convert($lan)] = $this->toNative($lan);
- Exclude checks
Parameter $type
has undeclared type \str
Open
Open
function installed($type='english')
- Exclude checks
Reference to undeclared property \language->_select_array
Open
Open
if($force ||null === $this->_select_array)
- Exclude checks
Returning type false
but convert()
is declared to return string
Open
Open
return (isset($this->list[$data])) ? $this->list[$data] : false;
- Exclude checks
Default value for \str
$type
can't be string
Open
Open
function installed($type='english')
- Exclude checks
Returning type int
but installed()
is declared to return array
Open
Open
return count($this->lanlist);
- Exclude checks
Returning type false
but convert()
is declared to return string
Open
Open
return isset($tmp[$data]) ? $tmp[$data] : false;
- Exclude checks