Showing 2,378 of 15,774 total issues
Function __set
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
public function __set($strName, $mixValue) {
switch ($strName) {
// APPEARANCE
case "TextAlign":
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
File QString.class.php
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* An abstract utility class to handle string manipulation. All methods
* are statically available.
*/
Method SetFieldType
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function SetFieldType($intMySqlFieldType) {
if (version_compare(PHP_VERSION, '5.6.15') >= 0) {
if (defined("MYSQLI_TYPE_JSON") && $intMySqlFieldType == MYSQLI_TYPE_JSON) {
$this->strType = QDatabaseFieldType::Json;
Method testCss
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testCss() {
$objCaseArray = array(
array(
"Value" => "0", "Expected" => "0;", "Msg" => "String zero renders with no 'px'"
),
Function Sizzle
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function Datepicker
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Datepicker() {
this._curInst = null; // The current instance in use
this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been disabled
this._datepickerShowing = false; // True if the popup picker is showing , false if not
Function _refresh
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_refresh: function() {
var maxHeight,
options = this.options,
heightStyle = options.heightStyle,
parent = this.element.parent();
Method GetAttributes
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function GetAttributes() {
$strToReturn = "";
$strStyle = "";
if (!$this->blnWrap)
Function _mouseDrag
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var i, item, itemElement, intersection,
o = this.options,
scrolled = false;
Function _mouseStart
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var i, body,
o = this.options;
Method SetupSoapMethods
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function SetupSoapMethods(ReflectionClass $objReflection) {
$objReflectionMethods = $objReflection->getMethods();
if ($objReflectionMethods) foreach ($objReflectionMethods as $objReflectionMethod) {
if ($objReflectionMethod->isPublic() && !$objReflectionMethod->isAbstract() &&
!$objReflectionMethod->isStatic() && !$objReflectionMethod->isConstructor() &&
Method __set
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __set($strName, $mixValue) {
switch ($strName) {
case '_ClickedButton': // Internal only. Do not use. Used by JS above to keep track of clicked button.
try {
$this->strClickedButtonId = QType::Cast($mixValue, QType::String);
Function buildFragment
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildFragment: function( elems, context, scripts, selection ) {
var j, elem, contains,
tmp, tag, tbody, wrap,
l = elems.length,
Function resize
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
resize: function( event ) {
var woset, hoset, isParent, isOffsetRelative,
that = $( this ).resizable( "instance" ),
o = that.options,
co = that.containerOffset,
Function _mouseDrag
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
this.dragged = true;
if (this.options.disabled) {
Method testFormatLength
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testFormatLength() {
$objCaseArray = array(
array(
"Value" => "0", "Expected" => "0", "Msg" => "String zero renders with no 'px'"
),
File jq_control.php
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
//include_once('simple_html_dom.php');
require('qcubed.inc.php');
require(__INCLUDES__ . '/codegen/QCodeGen.class.php');
Function widget
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
Function add
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data, selector ) {
var tmp, events, t, handleObjIn,
special, eventHandle, handleObj,
handlers, type, namespaces, origType,
elemData = jQuery._data( elem );
Function GetValue
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
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"