Showing 2,378 of 15,774 total issues
File QDialogBase.class.php
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Dialog Base Class
*
* The QDialogBase class defined here provides an interface between the generated
Function _keydown
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
_keydown: function( event ) {
var match, prev, character, skip, regex,
preventDefault = true;
function escape( value ) {
Method __set
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
try {
switch ($strName) {
case 'Month':
if ($this->blnDateNull && (!is_null($mixValue)))
Method __set
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case 'Accept':
$this->mixAccept = $mixValue;
$this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'accept', $mixValue);
Method AnalyzeDatabase
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function AnalyzeDatabase() {
if (!QApplication::$Database) {
$this->strErrors = 'FATAL ERROR: No databases are listed in the configuration file.';
return;
}
Method Form_Create
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function Form_Create() {
$strServerActionJsParam = "";
$this->btnSubmit = new QButton($this);
$this->btnSubmit->Text = "ServerAction Submit";
File QHtmlTable_CodeGenerator.class.php
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This is a base class to support classes that are derived from QHtmlTable. The methods here support the use
* of QHtmlTable derived classes as a list connector, something that displays a list of records from a database,
* and optionally allows the user to do CRUD operations on individual records.
QMenuGen
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class QMenuGen extends QPanel {
protected $strJavaScripts = __JQUERY_EFFECTS__;
protected $strStyleSheets = __JQUERY_CSS__;
/** @var boolean */
protected $blnDisabled = null;
QDatabaseCodeGen
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class QDatabaseCodeGen extends QCodeGen {
public $objSettingsXml; // Make public so templates can use it directly.
// Objects
/** @var array|QSqlTable[] Array of tables in the database */
Function Qcubed__DateTimePicker_Change
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Qcubed__DateTimePicker_Change(strControlId, objListbox) {
var objMonth = document.getElementById(strControlId + "_lstMonth"),
objDay = document.getElementById(strControlId + "_lstDay"),
objYear = document.getElementById(strControlId + "_lstYear"),
intCurrentDay,
Function _open
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
_open: function( event, target, content ) {
var tooltip, events, delayedShow, a11yContent,
positionOption = $.extend( {}, this.options.position );
if ( !content ) {
Function formatDate
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
formatDate: function (format, date, settings) {
if (!date) {
return "";
}
Method CastValueTo
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function CastValueTo($mixItem, $strNewType) {
$strOriginalType = gettype($mixItem);
switch (QType::TypeFromDoc($strNewType)) {
case QType::Boolean:
Function postAjax
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
postAjax: function(strForm, strControl, strEvent, mixParameter, strWaitIconControlId, blnAsync) {
var objForm = $j('#' + strForm),
strFormAction = objForm.attr("action"),
qFormParams = {};
Method testExample
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testExample() {
$objPersonArray = Person::QueryArray(
/* Only return the persons who have AT LEAST ONE overdue project */
QQ::GreaterThan(QQ::Sub(QQN::Person()->ProjectAsManager->Spent, QQN::Person()->ProjectAsManager->Budget), 20)
);
File QFileAssetBase.class.php
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file contains the QFileAssetBase class.
*
* @package Controls
Function CollapseNodes
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function CollapseNodes($mixParameterArray) {
/** @var QQNode[] $objNodeArray */
$objNodeArray = array();
foreach ($mixParameterArray as $mixParameter) {
if (is_array($mixParameter)) {
- 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 22 (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 SetSelectedItemsByValue
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function SetSelectedItemsByValue(array $mixValueArray, $blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
- 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 22 (exceeds 5 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case 'MaxDate':
case 'Maximum':
if (is_string($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"