Showing 2,378 of 15,774 total issues
Function GetValue
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static function GetValue($mixValue, QQueryBuilder $objBuilder, $blnEqualityType = null) {
if ($mixValue instanceof QQNamedValue) {
/** @var QQNamedValue $mixValue */
return $mixValue->Parameter($blnEqualityType);
}
- 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 GetDataGridHtml
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function GetDataGridHtml() {
// Array-ify Node Hierarchy
$objNodeArray = array();
$objNodeArray[] = $this;
- 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 RenderButtonTable
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function RenderButtonTable() {
$strToReturn = '';
if ($this->ItemCount > 0) {
// Figure out the number of ROWS for this table
$intRowCount = floor($this->ItemCount / $this->intRepeatColumns);
- 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 GenerateFile
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function GenerateFile($strModuleSubPath, $strTemplateFilePath, $mixArgumentArray, $blnSave = true) {
// Setup Debug/Exception Message
if (QCodeGen::DebugMode) _p("Evaluating $strTemplateFilePath<br/>", false);
// Check to see if the template file exists, and if it does, Load It
- 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 ConnectorCreateOptions
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function ConnectorCreateOptions(QCodeGenBase $objCodeGen, QSqlTable $objTable, $objColumn, $strControlVarName) {
$strRet = '';
if (!$objColumn) {
$strRet .= <<<TMPL
- 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 printResult
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function printResult(PHPUnit_Framework_TestResult $result)
{
echo('<h1>QCubed ' . QCUBED_VERSION_NUMBER_ONLY . ' Unit Tests - PHPUnit ' . PHPUnit_Runner_Version::id() . '</h1>');
foreach ($this->results as $suiteName=>$suite) {
- 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 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case 'MaxDate':
case 'Maximum':
if (is_string($mixValue)) {
Method __set
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case "AsButton":
try {
$this->blnAsButton = QType::Cast($mixValue, QType::Boolean);
Method GetItemHtml
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function GetItemHtml($objItem) {
$strItemId = $this->strControlId . '_' . $objItem->ItemId;
$objChildren = $objItem->ChildItemArray;
$intChildCount = count($objChildren);
Method QcubedHandleError
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function QcubedHandleError($__exc_errno, $__exc_errstr, $__exc_errfile, $__exc_errline, $__exc_errcontext) {
// If a command is called with "@", then we should return
if (error_reporting() == 0)
return true;
Method __set
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case 'AppendTo':
$this->mixAppendTo = $mixValue;
$this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'appendTo', $mixValue);
QHtmlAttributeManagerBase
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class QHtmlAttributeManagerBase extends QBaseClass {
/** @var array attributes stored in PHP native format so they can be retrieved. Escaping happens when they are drawn. */
protected $attributes = array();
protected $styles = array();
QOracleDatabase
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class QOracleDatabase extends QDatabaseBase {
const Adapter = 'Oracle Database Adapter';
protected $objOracle;
protected $EscapeIdentifierBegin = '';
QMySqliDatabase
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class QMySqliDatabase extends QDatabaseBase {
const Adapter = 'MySql Improved Database Adapter for MySQL 4';
protected $objMySqli;
Function getAjaxData
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
getAjaxData: function(strForm, strControl, strEvent, mixParameter, strWaitIconControlId) {
var $form = $j('#' + strForm),
$formElements = $form.find('input,select,textarea'),
checkables = [],
controls = [],
Method __set
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case 'Culture':
try {
$this->strCulture = QType::Cast($mixValue, QType::String);
Method testCasting
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testCasting() {
define('_FAIL_', 'fail');
$cases = array(
//array(value, display, expected result, cast to type),
array("25.0", "25.0", (float)25.0, QType::Float),
Method CodeLinks
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
Method GetForeignKeysForTable
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetForeignKeysForTable($strTableName) {
$objForeignKeyArray = array();
// Use Query to pull the FKs
$strQuery = sprintf('
Function GetActiveFilterValue
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function GetActiveFilterValue() {
$value = null;
//for manual queries
if (isset($this->FilterByCommand['value']))
$value = $this->FilterByCommand['value'];
- 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"