Showing 96 of 127 total issues
Function flexslider
has 808 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.flexslider = function(el, options) {
var slider = $(el);
// making variables public
slider.vars = $.extend({}, $.flexslider.defaults, options);
- Create a ticketCreate a ticket
File jquery.flexslider.js
has 895 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery FlexSlider v2.2.2
* Copyright 2012 WooThemes
* Contributing Author: Tyler Smith
*/
- Create a ticketCreate a ticket
Function fc_hash_html
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public static function fc_hash_html($html)
{
// Initialize some counting
$count['temp'] = 0; // temp counter
$count['links'] = 0;
- Read upRead up
- Create a ticketCreate a ticket
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 fc_hash_html
has 202 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function fc_hash_html($html)
{
// Initialize some counting
$count['temp'] = 0; // temp counter
$count['links'] = 0;
- Create a ticketCreate a ticket
Method getCMSFields
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCMSFields()
{
$fields = FieldList::create(
TabSet::create(
'Root',
- Create a ticketCreate a ticket
File FoxyStripeSetting.php
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Dynamic\FoxyStripe\Model;
use Dynamic\CountryDropdownField\Fields\CountryDropdownField;
- Create a ticketCreate a ticket
Function touch
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
touch: function() {
var startX,
startY,
offset,
cwidth,
- Create a ticketCreate a ticket
Method getCMSFields
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeByName([
- Create a ticketCreate a ticket
File ProductPage.php
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Dynamic\FoxyStripe\Page;
use Bummzack\SortableFile\Forms\SortableUploadField;
- Create a ticketCreate a ticket
`` has 31 functions (exceeds 20 allowed). Consider refactoring. Open
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d) {
//alert(jQuery.easing.default);
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
- Create a ticketCreate a ticket
File foxycart.cart_validation.php
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Dynamic\FoxyStripe\Model\FoxyCart;
/**
- Create a ticketCreate a ticket
Method getCMSFields
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCMSFields()
{
$this->beforeUpdateCMSFields(function (FieldList $fields) {
// Cateogry Dropdown field w/ add new
$source = function () {
- Create a ticketCreate a ticket
Method getProductFields
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getProductFields(FieldList $fields)
{
//Requirements::javascript('dynamic/foxystripe: client/dist/javascript/scripts.min.js');
$hiddenTitle = ($this->product->ReceiptTitle) ?
htmlspecialchars($this->product->ReceiptTitle) :
- Create a ticketCreate a ticket
Function setCurrentStore
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function setCurrentStore()
{
$client = $this->getClient();
$config = FoxyStripeSetting::current_foxystripe_setting();
- Read upRead up
- Create a ticketCreate a ticket
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 init
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function() {
slider.animating = false;
// Get current slide and make sure it is a number
slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
if ( isNaN( slider.currentSlide ) ) slider.currentSlide = 0;
- Create a ticketCreate a ticket
Function flexAnimate
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
if (!slider.vars.animationLoop && target !== slider.currentSlide) {
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
}
- Create a ticketCreate a ticket
Function parseOrderDetails
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function parseOrderDetails($response)
{
// remove previous OrderDetails and OrderOptions so we don't end up with duplicates
foreach ($this->Details() as $detail) {
- Read upRead up
- Create a ticketCreate a ticket
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 getCMSFields
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCMSFields()
{
$fields = parent::getCMSFields();
if ($this->ID) {
- Create a ticketCreate a ticket
File OptionItem.php
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Dynamic\FoxyStripe\Model;
use Dynamic\FoxyStripe\Page\ProductPage;
- Create a ticketCreate a ticket
Function getProductFields
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function getProductFields(FieldList $fields)
{
//Requirements::javascript('dynamic/foxystripe: client/dist/javascript/scripts.min.js');
$hiddenTitle = ($this->product->ReceiptTitle) ?
htmlspecialchars($this->product->ReceiptTitle) :
- Read upRead up
- Create a ticketCreate a ticket
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"