adm_program/system/classes/HtmlTable.php
Function prepareAndAddColumn
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
private function prepareAndAddColumn(string $type, int $key, $value, int $colspan = 1, int $colspanOffset = 1)
{
$columnAttributes = array();
// set colspan if parameters are set
- 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 addRowTypeByArray
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function addRowTypeByArray(string $type, array $arrColumnValues, string $id = '', array $arrAttributes = null, int $colspan = 1, int $colspanOffset = 1)
Method addRowByArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addRowByArray(array $arrColumnValues, string $id = '', array $arrAttributes = null, int $colspan = 1, int $colspanOffset = 1)
Method addRowFooterByArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addRowFooterByArray(array $arrColumnValues, string $id = '', array $arrAttributes = null, int $colspan = 1, int $colspanOffset = 1)
Method addRowHeadingByArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addRowHeadingByArray(array $arrColumnValues, string $id = '', array $arrAttributes = null, int $colspan = 1, int $colspanOffset = 1)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(string $id, HtmlPage $htmlPage = null, $hoverRows = true, bool $datatables = false, string $class = '')
Method prepareAndAddColumn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function prepareAndAddColumn(string $type, int $key, $value, int $colspan = 1, int $colspanOffset = 1)