\PHPUnit_Util_XML

XML helpers.

Synopsis

class PHPUnit_Util_XML {
}

Violations

PHPMessDetector

Line Rule Message
134 - 193 CyclomaticComplexity The method load() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
134 - 193 NPathComplexity The method load() has an NPath complexity of 1728. The configured NPath complexity threshold is 200.
242 - 299 CyclomaticComplexity The method xmlToVariable() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
358 - 469 CyclomaticComplexity The method convertSelectToTag() has a Cyclomatic Complexity of 21. The configured cyclomatic complexity threshold is 10.
358 - 469 NPathComplexity The method convertSelectToTag() has an NPath complexity of 8452. The configured NPath complexity threshold is 200.
358 - 469 ExcessiveMethodLength The method convertSelectToTag() has 112 lines of code. Current threshold is set to 100. Avoid really long methods.
514 - 877 CyclomaticComplexity The method findNodes() has a Cyclomatic Complexity of 88. The configured cyclomatic complexity threshold is 10.
514 - 877 NPathComplexity The method findNodes() has an NPath complexity of 81020998681623000. The configured NPath complexity threshold is 200.
514 - 877 ExcessiveMethodLength The method findNodes() has 364 lines of code. Current threshold is set to 100. Avoid really long methods.

Checkstyle

Line Column Severity Message
76 62 error Only one argument is allowed per line in a multi-line function call
76 74 error Only one argument is allowed per line in a multi-line function call
247 13 error CASE statements must not be defined using curly braces
262 13 error CASE statements must not be defined using curly braces
283 13 error CASE statements must not be defined using curly braces
290 13 error CASE statements must not be defined using curly braces
365 51 error Only one argument is allowed per line in a multi-line function call
365 68 error Only one argument is allowed per line in a multi-line function call
404 59 error Only one argument is allowed per line in a multi-line function call
404 69 error Only one argument is allowed per line in a multi-line function call
416 21 error Expected "} elseif (...) {\n"; found "} // class matched\n elseif (...) {\n"
419 21 error Expected "} elseif (...) {\n"; found "} // attribute matched\n elseif (...) {\n"
429 25 error Expected "} elseif (...) {\n"; found "} // match substring\n elseif (...) {\n"
433 25 error Expected "} else {\n"; found "} // exact match\n else {\n"
537 27 error Only one argument is allowed per line in a multi-line function call
551 9 error Expected "} else {\n"; found "} // no tag selected, get them all\n else {\n"
575 31 error Only one argument is allowed per line in a multi-line function call
603 21 error Expected "} elseif (...) {\n"; found "} // class can match only a part\n elseif (...) {\n"
606 34 error Only one argument is allowed per line in a multi-line function call
621 21 error Expected "} else {\n"; found "} // match by exact string\n else {\n"
653 17 error Expected "} elseif (...) {\n"; found "} // match empty string\n elseif (...) {\n"
658 17 error Expected "} elseif (...) {\n"; found "} // match by exact string\n elseif (...) {\n"
803 39 error Only one argument is allowed per line in a multi-line function call
824 21 error Expected "} elseif (...) {\n"; found "} // range count of children\n elseif (...) {\n"
831 21 error Expected "} elseif (...) {\n"; found "} // less than a given count\n elseif (...) {\n"
836 21 error Expected "} elseif (...) {\n"; found "} // more than a given count\n elseif (...) {\n"
845 35 error Only one argument is allowed per line in a multi-line function call
845 58 error Only one argument is allowed per line in a multi-line function call

Methods

protected

public

  • assertValidKeys() — Validate list of keys in the associative array.
  • convertSelectToTag() — Parse a CSS selector into an associative array suitable for use with findNodes().
  • cssSelect() — Parse an $actual document and return an array of DOMNodes matching the CSS $selector. If an error occurs, it will return false.
  • findNodes() — Parse out the options from the tag using DOM object tree.
  • load() — Load an $actual document into a DOMDocument. This is called from the selector assertions.
  • loadFile() — Loads an XML (or HTML) file into a DOMDocument object.
  • nodeToText()
  • prepareString() — Escapes a string for the use in XML documents Any Unicode character is allowed, excluding the surrogate blocks, FFFE, and FFFF (not even as character reference).
  • removeCharacterDataNodes()
  • xmlToVariable() — "Convert" a DOMElement object into a PHP variable.

History