Showing 552 of 784 total issues
Method testRunPageSpeedResultReader
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testRunPageSpeedResultReader()
{
$json = json_encode([
'id' => 'https://example.com/',
'formattedResults' => [
Function injectElementWithStyles
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
injectElementWithStyles = function( rule, callback, nodes, testnames ) {
var style, ret, node, docOverflow,
div = document.createElement('div'),
body = document.body,
Function countAlphaImageLoaderFilter
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
countAlphaImageLoaderFilter: function(v) {
var t, u, s, w, r = 0,
x = 0,
q = {};
t = v.indexOf("filter:");
Function html
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
html: function( value ) {
return access( this, function( value ) {
var elem = this[ 0 ] || {},
i = 0,
l = this.length;
Function toggleClass
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleClass: function( value, stateVal ) {
var type = typeof value;
if ( typeof stateVal === "boolean" && type === "string" ) {
return stateVal ? this.addClass( value ) : this.removeClass( value );
Function onTouchStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
FastClick.prototype.onTouchStart = function(event) {
'use strict';
var targetElement, touch, selection;
// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
Function html
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
html: function( value ) {
return access( this, function( value ) {
var elem = this[ 0 ] || {},
i = 0,
l = this.length;
Function toggleClass
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleClass: function( value, stateVal ) {
var type = typeof value;
if ( typeof stateVal === "boolean" && type === "string" ) {
return stateVal ? this.addClass( value ) : this.removeClass( value );
Function onTouchStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
FastClick.prototype.onTouchStart = function(event) {
'use strict';
var targetElement, touch, selection;
// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
Function openSaveAsDialog
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
openSaveAsDialog: function(s, r) {
var q = '<label>Save ruleset as: <input type="text" id="saveas-name" class="text-input" name="saveas-name" length="100" maxlength="100"></label>',
t = "Save",
u = function(B) {
var y, w, v, z, x, A = YSLOW.util.getCurrentTarget(B).ownerDocument;
Function fix
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fix: function( event ) {
if ( event[ jQuery.expando ] ) {
return event;
}
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each(function() {
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each(function() {
Function drawGraph
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
var option = {
title: {
text: dataTitle,
align: 'center'
Function fix
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fix: function( event ) {
if ( event[ jQuery.expando ] ) {
return event;
}
Function drawGraph
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
var option = {
title: {
text: dataTitle,
align: 'center'
Function doRequest
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function doRequest($url, $try = null)
{
if (is_null($try)) {
$try = $this->retry;
}
- 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 handle
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function handle()
{
$unhandledJob = $this->job->getUnhandledJob()->first();
if ($unhandledJob) {
$this->updateJob($unhandledJob, 1);
- 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 reportcardView
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reportcardView: function(w) {
var t, r, y, u = w.getOverallScore(),
s = YSLOW.util.prettyScore(u),
x = w.getRulesetApplied(),
v = w.getResults(),
Function plotOne
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
plotOne: function(A, t, z, y) {
var s, u, C, r, x, q, w, D, v, B = A.getElementsByTagName("canvas");
for (u = 0; u < B.length; u += 1) {
if (B[u].id === y) {
s = B[u]