dynamic/foxystripe

View on GitHub

Showing 127 of 127 total issues

Function parseOrderCustomer has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function parseOrderCustomer($response)
    {
        foreach ($response->transactions->transaction as $transaction) {
            // if not a guest transaction in FoxyCart
            if (isset($transaction->customer_email) && $transaction->is_anonymous == 0) {
Severity: Minor
Found in src/Model/Order.php - About 45 mins to fix

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 easeInBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInBack: function (x, t, b, c, d, s) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 45 mins to fix

Function getProductOptionSet has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    protected function getProductOptionSet()
    {
        $options = $this->product->ProductOptions();
        $groupedOptions = new GroupedList($options);
        $groupedBy = $groupedOptions->groupBy('ProductOptionGroupID');
Severity: Minor
Found in src/Form/FoxyStripePurchaseForm.php - About 45 mins to fix

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

Avoid deeply nested control flow statements.
Open

                        if ($result = $client->get($store_exists_uri, $data)) {
                            $errors = array_merge($errors, $client->getErrors($result));
                            if ($store = $client->getLink('fx:store')) {
                                $errors = array_merge($errors, $client->getErrors($store));
                                $this->current_store = $store;
Severity: Major
Found in src/Model/FoxyStripeClient.php - About 45 mins to fix

Consider simplifying this complex logical expression.
Open

              } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
                slider.pause();
                // CAROUSEL:
                cwidth = (vertical) ? slider.h : slider. w;
                startT = Number(new Date());
Severity: Major
Found in thirdparty/flexslider/jquery.flexslider.js - About 40 mins to fix

Function queryNewValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        queryNewValue = function (code, newValue, link, id, clicked) {
Severity: Minor
Found in client/src/javascript/quantity.js - About 35 mins to fix

Function easeOutElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeOutElastic: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeInOutExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInOutExpo: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeInSine has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInSine: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function flexAnimate has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
Severity: Minor
Found in thirdparty/flexslider/jquery.flexslider.js - About 35 mins to fix

Function easeInQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInQuad: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeInOutCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInOutCubic: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeOutCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeOutCubic: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeInCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInCirc: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeOutCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeOutCirc: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeInQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInQuart: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeOutExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeOutExpo: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeInOutQuint has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInOutQuint: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeOutQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeOutQuad: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix

Function easeInOutQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    easeInOutQuad: function (x, t, b, c, d) {
Severity: Minor
Found in thirdparty/flexslider/demo/js/jquery.easing.js - About 35 mins to fix
Severity
Category
Status
Source
Language