Showing 2,378 of 15,774 total issues
Function Validate
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function Validate() {
if (parent::Validate()) {
if ($this->strText != "") {
$dttTest = QDateTimeTextBox::ParseForDateTimeValue($this->strText);
- 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 __construct
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($mixFieldData, $objDb = null) {
$this->strName = $mixFieldData->GetColumn('column_name');
$this->strOriginalName = $this->strName;
$this->strTable = $mixFieldData->GetColumn('table_name');
$this->strOriginalTable = $this->strTable;
- 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 AnalyzeAssociationTable
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
protected function AnalyzeAssociationTable($strTableName) {
$objFieldArray = $this->objDb->GetFieldsForTable($strTableName);
// Association tables must have 2 fields
if (count($objFieldArray) != 2) {
- 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 RenderEnd
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function RenderEnd($blnDisplayOutput = true) {
// Ensure that RenderEnd() has not yet been called
switch ($this->intFormStatus) {
case QFormBase::FormStatusUnrendered:
throw new QCallerException('$this->RenderBegin() was never called');
Method __set
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
// APPEARANCE
case "TextAlign":
try {
Function Validate
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function Validate() {
if (parent::Validate()) {
if ($this->strText != "") {
try {
$this->strText = QType::Cast($this->strText, $this->strDataType);
- 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 ConnectorCreate
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ConnectorCreate(QCodeGenBase $objCodeGen, QSqlTable $objTable, $objColumn) {
$strObjectName = $objCodeGen->ModelVariableName($objTable->Name);
$strControlVarName = $objCodeGen->ModelConnectorVariableName($objColumn);
$strLabelName = addslashes(QCodeGen::ModelConnectorControlName($objColumn));
$strPropName = QCodeGen::ModelConnectorPropertyName($objColumn);
File QHtml.class.php
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* An abstract utility class to handle Html tag rendering, as well as utilities to render
* pieces of HTML and CSS code. All methods are static.
*/
Function __set
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case 'MaxDate':
case 'Maximum':
try{
- 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 GetFilterRowHtml
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
protected function GetFilterRowHtml() {
$objFilterStyle = $this->objRowStyle->ApplyOverride($this->objFilterRowStyle);
$strToReturn = sprintf(' <tr %s>'."\r\n", $objFilterStyle->GetAttributes());
if($this->objColumnArray !== 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 SetCssBoxValue
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function SetCssBoxValue($strPrefix, $mixValue) {
if (is_string($mixValue)) {
// shortcut
$this->SetCssStyle($strPrefix, $mixValue);
} elseif (is_array($mixValue)) {
- 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 Validate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function Validate() {
if ($this->blnRequired) {
$blnIsNull = false;
if (!$this->dttDateTime)
- 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 SetupTabs
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
protected function SetupTabs() {
$strClassNames = $this->CreateClassNameArray();
$this->tabs->RemoveChildControls(true);
$this->categories = 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"
Further reading
Function CodeLinks
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- 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 __set
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
$this->blnModified = true;
switch ($strName) {
// MISC
Function defaultPrefilter
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
/* jshint validthis: true */
var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
anim = this,
orig = {},
Method ParsePostData
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ParsePostData() {
$blnIsDateTimeSet = false;
if ($this->dttDateTime == null) {
$dttNewDateTime = QDateTime::Now();
Function LongestCommonSubsequence
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public final static function LongestCommonSubsequence($str1, $str2) {
if (defined('__QAPPLICATION_ENCODING_TYPE__')) {
$str1Len = mb_strlen($str1, __QAPPLICATION_ENCODING_TYPE__);
$str2Len = mb_strlen($str2, __QAPPLICATION_ENCODING_TYPE__);
} else {
- 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 __set
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
// APPEARANCE
case "Text":
try {
- 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 MakeJqOptions
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function MakeJqOptions() {
$jqOptions = null;
if (!is_null($val = $this->AddClasses)) {$jqOptions['addClasses'] = $val;}
if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
if (!is_null($val = $this->Axis)) {$jqOptions['axis'] = $val;}
- 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"