Showing 12 of 12 total issues
Function parseNode
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
protected function parseNode(\DOMElement $node)
{
// @todo improve array type check
$isArray = $node->hasAttribute('arrayType');
$hasHref = $node->hasAttribute('href');
- Read upRead up
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 runController
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function runController()
{
list($class, $method) = explode('@', $this->action['uses']);
$parameters = $this->resolveClassMethodDependencies(
Method runController
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function runController()
{
list($class, $method) = explode('@', $this->action['uses']);
$parameters = $this->resolveClassMethodDependencies(
Method parseNode
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseNode(\DOMElement $node)
{
// @todo improve array type check
$isArray = $node->hasAttribute('arrayType');
$hasHref = $node->hasAttribute('href');
Function getRawContentParams
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getRawContentParams()
{
if (null === $this->rawContent) {
return [];
}
- Read upRead up
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
Function getNodeValueById
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function getNodeValueById($id, \DOMElement $node)
{
if (false === ($node->childNodes instanceof \DOMNodeList)) {
return null;
}
- Read upRead up
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
Function runController
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function runController()
{
list($class, $method) = explode('@', $this->action['uses']);
$parameters = $this->resolveClassMethodDependencies(
- Read upRead up
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
Avoid too many return
statements within this method. Open
return new Response($responseContent);
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return new Response($responseContent);
Function validate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function validate()
{
try {
$this->validateContent();
} catch (\Exception $e) {
- Read upRead up
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
Function runController
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function runController()
{
list($class, $method) = explode('@', $this->action['uses']);
$parameters = $this->resolveClassMethodDependencies(
- Read upRead up
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"