Function renderTag
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function renderTag($content, $tag_type = 'default', array $args = array())
{
switch($tag_type) {
// case of the tables ($content is an array of lines that are an array of cells)
- 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 _getArgsStackForTable
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function _getArgsStackForTable(array &$args, $entry, $scope)
{
$found_args = array();
$global_args = $this->_getArgsStack($args, $entry, array(), false);
if (!empty($global_args)) {
- 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 renderTag
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function renderTag($content, $tag_type = 'default', array $args = array())
{
switch($tag_type) {
// case of the tables ($content is an array of lines that are an array of cells)
Method _doTable
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _doTable(&$content, array &$args = array())
{
$table = new TableTool(
isset($content['body']) && is_array($content['body']) ? $content['body'] : array($content),
isset($content['head']) && is_array($content['head']) ? $content['head'] : array(),
Function _doTable
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function _doTable(&$content, array &$args = array())
{
$table = new TableTool(
isset($content['body']) && is_array($content['body']) ? $content['body'] : array($content),
isset($content['head']) && is_array($content['head']) ? $content['head'] : array(),
- 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"