Showing 2,378 of 15,774 total issues
Function FetchCellObject
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function FetchCellObject($item) {
if ($this->blnNullSafe && $item == null)
return null;
foreach ($this->strPropertiesArray as $strProperty) {
$item = $item->$strProperty;
- 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 GetRowClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function GetRowClass ($objObject, $intRowIndex) {
if (($intRowIndex % 2) == 1 && $this->strAlternateRowCssClass) {
return $this->strAlternateRowCssClass;
} else if ($this->strRowCssClass) {
return $this->strRowCssClass;
- 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 GetColumnIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function GetColumnIndex($strName) {
$intIndex = -1;
if ($this->objColumnArray) foreach ($this->objColumnArray as $objColumn) {
++$intIndex;
if ($objColumn->Name == $strName)
- 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 Render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function Render() {
if ($this->blnModified) {
$strToReturn = '';
foreach ($this->objControlArray as $objControl) {
if ($objControl->Rendered)
- 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 RemoveControl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function RemoveControl($strControlId) {
if (isset($this->objControlArray[$strControlId])) {
// Get the Control in Question
$objControl = $this->objControlArray[$strControlId];
- 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 GetColumnById
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function GetColumnById($strId) {
if ($this->objColumnArray) foreach ($this->objColumnArray as $objColumn)
if ($objColumn->Id === $strId)
return $objColumn;
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 GetWebUrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function GetWebUrl() {
// First of all, if ClickToView is NOT set, then we obvioulsy will not pass out the URL
if (!$this->blnClickToView) {
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 GetHeaderRowHtml
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function GetHeaderRowHtml() {
$strToReturn = '';
for ($i = 0; $i < $this->intHeaderRowCount; $i++) {
$this->intCurrentHeaderRowIndex = $i;
- 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 GetColumnsByName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function GetColumnsByName($strName) {
$objColumnArrayToReturn = array();
if ($this->objColumnArray) foreach ($this->objColumnArray as $objColumn)
if ($objColumn->Name == $strName)
array_push($objColumnArrayToReturn, $objColumn);
- 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 EvaluateTemplate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function EvaluateTemplate($strTemplate) {
global $_ITEM;
global $_CONTROL;
global $_FORM;
- 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 GetColumnByName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function GetColumnByName($strName) {
if ($this->objColumnArray) foreach ($this->objColumnArray as $objColumn)
if ($objColumn->Name == $strName)
return $objColumn;
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 QCubedShutdown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function QCubedShutdown() {
if (defined ('__TIMER_OUT_FILE__')) {
$strTimerOutput = QTimer::VarDump(false);
if ($strTimerOutput) {
file_put_contents(__TIMER_OUT_FILE__, $strTimerOutput . "\n", FILE_APPEND);
- 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 ParseNameFromKeyDefinition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function ParseNameFromKeyDefinition($strKeyDefinition) {
$strKeyDefinition = trim($strKeyDefinition);
$intPosition = strpos($strKeyDefinition, '(');
- 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 GetClient
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function GetClient() {
if (!class_exists('Predis\Client')) {
throw new QCallerException('Predis library needs to be installed for Redis Formstate Handler to work');
}
- 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 GetColIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function GetColIndex()
{
//cached, to improve performance
if($this->colIndex == -1)
{
- 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 testMod
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function testMod() {
$objTest = new TypeTest();
$objTest->TestInt = 11;
$objTest->Save();
- 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 setButtonActions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function setButtonActions(array $arrButtons = null) {
// get the QImageBrowser control
$objImageBrowser = $this->ParentControl;
while ( !($objImageBrowser instanceof QImageBrowserBase) ) {
$objImageBrowser = $objImageBrowser->ParentControl;
- 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 Connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function Connect() {
// Lookup Adapter-Specific Connection Properties
$strServer = $this->Server;
$strName = $this->Database;
$strUsername = $this->Username;
- 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 CalculateGraphPrefixArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function CalculateGraphPrefixArray($objForeignKeyArray) {
// Analyze Column Names to determine GraphPrefixArray
if ((strpos(strtolower($objForeignKeyArray[0]->ColumnNameArray[0]), 'parent') !== false) ||
(strpos(strtolower($objForeignKeyArray[1]->ColumnNameArray[0]), 'child') !== false)) {
$strGraphPrefixArray[0] = '';
- 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 Connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function Connect() {
// Lookup Adapter-Specific Connection Properties
$strServer = $this->Server;
$strName = $this->Database;
$strUsername = $this->Username;
- 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"