e107inc/e107

View on GitHub
e107_handlers/xml_class.php

Summary

Maintainability
A
0 mins
Test Coverage
F
42%

Reference to undeclared property \parseXml->parser
Open

        $this->parser = xml_parser_create('');
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

            $this -> counterArray[$this -> current_tag] = 0;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Parameter $xml has undeclared type \SimpleXMLElement
Open

    function xml2array($xml, $rec_parent = '')
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Argument 1 (text) is false but \e_parse::replaceConstants() takes string defined at /code/e107_handlers/e_parse_class.php:3025
Open

            $path = e107::getParser()->replaceConstants($this->filePathDestination);
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Argument 1 (XMLData) is string but \xmlClass::e107ImportPrefs() takes array defined at /code/e107_handlers/xml_class.php:1154
Open

                $pArray = $this->e107ImportPrefs($xmlArray,$type, 'plugin');
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to undeclared function characterData in callable
Open

        xml_set_character_data_handler( $this->parser, 'characterData' );
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

        $this -> current_tag = strtolower($element);
Severity: Minor
Found in e107_handlers/xml_class.php by phan

When fetching an array index from a value of type string, found an array index of type 'database', but expected the index to be of type int
Open

            foreach($xmlArray['database']['dbTable'] as $val)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->xmlLegacyContents
Open

        $this->xmlLegacyContents = $data;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

            $this -> xmlData [$this -> current_tag] [$this -> counterArray[$this -> current_tag]] = $data;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->start_tag
Open

        if($this -> start_tag == $element)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Returning type false but parseXml() is declared to return array|string
Open

            return FALSE;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to method attributes from undeclared class \SimpleXMLElement
Open

                        $tmp = (array) $xml->attributes();
Severity: Critical
Found in e107_handlers/xml_class.php by phan

Returning type null but e107Export() is declared to return string
Open

            return null;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

string passed to foreach instead of array
Open

            foreach($xmlArray['prefs'] as $type=>$array)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \XMLParse->parser (Did you mean expr->parsed)
Open

        $this->parser = xml_parser_create();
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->start_tag
Open

        $this -> start_tag = $element;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Assigning string to property but \xmlClass->urlPrefix is false
Open

        $this->urlPrefix = $url;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Assigning 'HTML cannot be parsed as XML' to property but \xmlClass->errors is null
Open

            $this->errors = "HTML cannot be parsed as XML";
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Returning type array but parseStringTags() is declared to return string
Open

        return $vars;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Returning type false but e107Export() is declared to return string
Open

                return FALSE;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

string passed to foreach instead of array
Open

            foreach($xmlArray['pluginPrefs'] as $type=>$array)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->parser
Open

            if (!xml_parse($this->parser, $data))
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

        if(array_key_exists($this -> counterArray[$this -> current_tag], $this -> xmlData [$this -> current_tag]))
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

            $this -> xmlData[$this -> current_tag][$this -> counterArray[$this -> current_tag]] = "";
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to method getName from undeclared class \SimpleXMLElement
Open

            return ($this->_optAddRoot ? array($xml->getName() => $ret) : $ret);
Severity: Critical
Found in e107_handlers/xml_class.php by phan

Returning type true but e107Export() is declared to return string
Open

                return true;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->xmlLegacyContents
Open

        if(!$this -> xmlLegacyContents)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Argument 1 (XMLData) is string but \xmlClass::e107ImportPrefs() takes array defined at /code/e107_handlers/xml_class.php:1154
Open

                $pArray = $this->e107ImportPrefs($xmlArray,$type, 'theme');
Severity: Minor
Found in e107_handlers/xml_class.php by phan

string passed to foreach instead of array
Open

            foreach($xmlArray['database']['dbTable'] as $val)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->parser
Open

        xml_set_character_data_handler( $this->parser, 'characterData' );
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->xmlLegacyContents
Open

        $array = explode("\n", $this -> xmlLegacyContents);
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->parser
Open

        xml_parser_free( $this->parser );
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

        if(!array_key_exists($this -> current_tag, $this -> counterArray))
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to instance property comment from undeclared class \SimpleXMLElement
Open

                        $ret['comment'] = $xml->comment;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to undeclared method \e_object::save
Open

                     e107::getConfig($type)
Severity: Critical
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \XMLParse->parser (Did you mean expr->parsed)
Open

        $parser = $this->parser;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->parser
Open

        xml_set_object($this->parser, $this);
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->parser
Open

        xml_set_element_handler($this->parser, 'startElement', 'endElement');
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

            $this -> counterArray[$this -> current_tag] ++;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

            $this -> xmlData [$this -> current_tag] = array();
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

            $this -> xmlData [$this -> current_tag] [$this -> counterArray[$this -> current_tag]] .= $data;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to method attributes from undeclared class \SimpleXMLElement
Open

                    $tmp = (array) $xml->attributes();
Severity: Critical
Found in e107_handlers/xml_class.php by phan

Call to undeclared method \e_object::save
Open

                     e107::getThemeConfig($type)
Severity: Critical
Found in e107_handlers/xml_class.php by phan

When fetching an array index from a value of type string, found an array index of type 'dbTable', but expected the index to be of type int
Open

            foreach($xmlArray['database']['dbTable'] as $val)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to undeclared function endElement in callable
Open

        xml_set_element_handler($this->parser, 'startElement', 'endElement');
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->current_tag
Open

        if(!array_key_exists($this -> current_tag, $this -> xmlData))
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Returning type false but parseXml() is declared to return array|string
Open

            return false;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Argument 3 (fields) is null but \e_db::index() takes array defined at /code/e107_handlers/e_db_interface.php:277
Open

                if($pri = e107::getDb()->index($eTable, 'PRIMARY', null, true))
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to undeclared method \e_object::save
Open

                     e107::getPlugConfig($type)
Severity: Critical
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \XMLParse->status
Open

        $this->status = 'parsing complete';
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Reference to undeclared property \parseXml->parser
Open

                $error = sprintf('XML error: %s at line %d, column %d', xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser),xml_get_current_column_number($this->parser));
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Returning type null but e107Import() is declared to return array
Open

            return null;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Assigning array|false to property but \xmlClass->errors is null
Open

            $this->errors = $this->getErrors($xmlData);
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Argument 1 (XMLData) is string but \xmlClass::e107ImportPrefs() takes array defined at /code/e107_handlers/xml_class.php:1154
Open

                $pArray = $this->e107ImportPrefs($xmlArray,$type);
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Returning type false but parseXml() is declared to return array|string
Open

            return FALSE;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
Open

        return $this->filePathDestination.$file;
Severity: Minor
Found in e107_handlers/xml_class.php by phan

Call to undeclared function startElement in callable
Open

        xml_set_element_handler($this->parser, 'startElement', 'endElement');
Severity: Minor
Found in e107_handlers/xml_class.php by phan

When fetching an array index from a value of type string, found an array index of type 'prefs', but expected the index to be of type int
Open

            foreach($xmlArray['prefs'] as $type=>$array)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

When fetching an array index from a value of type string, found an array index of type 'pluginPrefs', but expected the index to be of type int
Open

            foreach($xmlArray['pluginPrefs'] as $type=>$array)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

When fetching an array index from a value of type string, found an array index of type 'themePrefs', but expected the index to be of type int
Open

            foreach($xmlArray['themePrefs'] as $type=>$array)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

string passed to foreach instead of array
Open

            foreach($xmlArray['themePrefs'] as $type=>$array)
Severity: Minor
Found in e107_handlers/xml_class.php by phan

There are no issues that match your filters.

Category
Status