Function parseTag
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
protected function parseTag(IIterator $iterator, IXmlHandler $xmlHandler) {
$last = null;
$name = '';
$attributeList = [];
$type = self::XML_TYPE_WARP;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method parseTag
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseTag(IIterator $iterator, IXmlHandler $xmlHandler) {
$last = null;
$name = '';
$attributeList = [];
$type = self::XML_TYPE_WARP;
- Create a ticketCreate a ticket
Function parseAttribute
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function parseAttribute(IIterator $iterator) {
$name = null;
$open = false;
$quote = null;
$value = null;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method parseAttribute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseAttribute(IIterator $iterator) {
$name = null;
$open = false;
$quote = null;
$value = null;
- Create a ticketCreate a ticket
Function parseComment
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function parseComment(IIterator $iterator) {
$type = self::XML_TYPE_COMMENT;
$close = false;
foreach ($iterator as $char) {
switch ($char) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"