Showing 2,378 of 15,774 total issues
Method __set
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case "RowCssClass":
try {
$this->strRowCssClass = QType::Cast($mixValue, QType::String);
Function CastValueTo
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
private static function CastValueTo($mixItem, $strNewType) {
$strOriginalType = gettype($mixItem);
switch (QType::TypeFromDoc($strNewType)) {
case QType::Boolean:
- 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 toJsObject
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public static function toJsObject($objValue) {
$strRet = '';
switch (gettype($objValue)) {
case 'double':
- 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 Autoload
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public static function Autoload($strClassName) {
if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
require_once (QApplication::$ClassFile[strtolower($strClassName)]);
return true;
} else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
protected function MakeJqOptions() {
$jqOptions = null;
if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
if (!is_null($val = $this->Axis)) {$jqOptions['axis'] = $val;}
if (!is_null($val = $this->Cancel)) {$jqOptions['cancel'] = $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"
Further reading
Function __set
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case "AsButton":
try {
$this->blnAsButton = QType::Cast($mixValue, QType::Boolean);
- 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 FlowThrough
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
protected function FlowThrough($strPath) {
// No Image Type changing
if ((!$this->strImageType) || ($this->strImageType == $this->strSourceImageType)) {
if ($strPath)
copy($this->strImagePath, $strPath);
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
public function Validate() {
// Copy text
$strText = $this->strText;
// Check for Required
if ($this->blnRequired) {
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
$this->blnModified = true;
switch ($strName) {
case "MinDate" :
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 GenerateAll
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function GenerateAll() {
$strReport = '';
// Iterate through all the tables, generating one class at a time
if ($this->objTableArray) foreach ($this->objTableArray as $objTable) {
- 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 trigger
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem, onlyHandlers ) {
var handle, ontype, cur,
bubbleType, special, tmp, i,
eventPath = [ elem || document ],
type = hasOwn.call( event, "type" ) ? event.type : event,
Method __set
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case 'MaxDate':
case 'Maximum':
try{
Method __set
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case "Name":
try {
$this->strName = QType::Cast($mixValue, QType::String);
Method __set
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
$this->blnModified = true;
switch ($strName) {
// BEHAVIOR
Method ConnectorCreate
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ConnectorCreate(QCodeGenBase $objCodeGen, QSqlTable $objTable, $objColumn) {
if ($objColumn instanceof QManyToManyReference) {
throw new Exception ("Autocomplete does not support many-to-many references.");
}
Method SetupTabs
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function SetupTabs() {
$strClassNames = $this->CreateClassNameArray();
$this->tabs->RemoveChildControls(true);
$this->categories = array();
Function Validate
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function Validate() {
if (!parent::Validate()) {
return false;
}
- 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 MakeUrl
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static function MakeUrl ($strLocation, $queryParams = null, $strAnchor = null, $strScheme = null, $strHost = null, $strUser = null, $strPassword = null, $intPort = null) {
// Decompose
if ($strLocation) {
$params = parse_url($strLocation);
}
- 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 InitializeDatabaseConnections
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static function InitializeDatabaseConnections() {
// for backward compatibility, don't use MAX_DB_CONNECTION_INDEX directly,
// but check if MAX_DB_CONNECTION_INDEX is defined
$intMaxIndex = defined('MAX_DB_CONNECTION_INDEX') ? constant('MAX_DB_CONNECTION_INDEX') : 9;
- 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 QueryCount
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static function QueryCount(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
// Get the Query Statement
try {
$strQuery = static::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, true);
} catch (QCallerException $objExc) {
- 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"