lib/Ajde/Template/Parser/Xhtml.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '13', column '20').
Open

        $doc = new DOMDocument();
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '22', column '23').
Open

            throw new Ajde_Exception('Xhtml Parser error: '.$e->getMessage());
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

TODO found
Open

            // TODO:
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by fixme

The class Ajde_Template_Parser_Xhtml is not named in CamelCase.
Open

class Ajde_Template_Parser_Xhtml extends Ajde_Template_Parser
{
    protected $_defaultNS = null;
    protected $_acNS = null;
    protected $_avNS = null;
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The property $_defaultNS is not named in camelCase.
Open

class Ajde_Template_Parser_Xhtml extends Ajde_Template_Parser
{
    protected $_defaultNS = null;
    protected $_acNS = null;
    protected $_avNS = null;
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $_avNS is not named in camelCase.
Open

class Ajde_Template_Parser_Xhtml extends Ajde_Template_Parser
{
    protected $_defaultNS = null;
    protected $_acNS = null;
    protected $_avNS = null;
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $_acNS is not named in camelCase.
Open

class Ajde_Template_Parser_Xhtml extends Ajde_Template_Parser
{
    protected $_defaultNS = null;
    protected $_acNS = null;
    protected $_avNS = null;
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The method _process is not named in camelCase.
Open

    protected function _process(DOMElement $root)
    {
        foreach ($root->getElementsByTagNameNS($this->_acNS, '*') as $element) {
            /* @var $element Ajde_Template_Parser_Xhtml_Element */
            if ($element->inACNameSpace()) {
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _breakOutCdata is not named in camelCase.
Open

    protected function _breakOutCdata($xml)
    {
        $patterns = [
            '%<a[cv]:.+?<!\[CDATA\[%',
            '%\]\]>.*</a[cv]:.+?>%',
Severity: Minor
Found in lib/Ajde/Template/Parser/Xhtml.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status