dynamic/foxystripe

View on GitHub

Showing 96 of 127 total issues

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

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

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

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

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

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

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

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

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

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

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

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

Function getAPIRequest has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static function getAPIRequest($foxyData = array())
    {
        if (self::getStoreKey() && self::getFoxyCartStoreName()) {
            $config = FoxyStripeSetting::current_foxystripe_setting();
            if ($config->CustomSSL) {
Severity: Minor
Found in src/Model/FoxyCart.php - About 35 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 modifyOrderDetailPrice has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function modifyOrderDetailPrice($OrderProduct, $OrderDetail, $product)
    {
        if (!$OrderProduct) {
            return;
        }
Severity: Minor
Found in src/Controller/FoxyStripeController.php - About 35 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 updateConfig has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function updateConfig()
    {
        $data = static::config()->get('data');
        $transactionDate = $data['TransactionDate'];
        static::config()->merge('data', [
Severity: Minor
Found in src/Controller/DataTestController.php - About 35 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 too many return statements within this method.
Open

                return 'none';
Severity: Major
Found in src/Controller/FoxyStripeController.php - About 30 mins to fix

Function getFoxyCartStoreName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getFoxyCartStoreName()
    {
        $config = FoxyStripeSetting::current_foxystripe_setting();
        if ($config->CustomSSL) {
            if ($config->RemoteDomain) {
Severity: Minor
Found in src/Model/FoxyCart.php - About 25 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 onBeforeDelete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function onBeforeDelete()
    {
        if ($this->Status != 'Published') {
            if ($this->ProductOptions()) {
                $options = $this->getComponents('ProductOptions');
Severity: Minor
Found in src/Page/ProductPage.php - About 25 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 putCategory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function putCategory($data = [])
    {
        $client = $this->getClient();
        $errors = [];

Severity: Minor
Found in src/Model/FoxyStripeClient.php - About 25 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 handleDataFeed has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function handleDataFeed($encrypted, $decrypted)
    {
        $orders = new \SimpleXMLElement($decrypted);

        // loop over each transaction to find FoxyCart Order ID
Severity: Minor
Found in src/Controller/FoxyStripeController.php - About 25 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 onBeforeDelete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function onBeforeDelete()
    {
        parent::onBeforeDelete();

        //make sure that if we delete this option group, we reassign the group's option items to the 'None' group.
Severity: Minor
Found in src/Model/OptionGroup.php - About 25 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 getEditForm has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getEditForm($id = null, $fields = null)
    {
        $config = FoxyStripeSetting::current_foxystripe_setting();
        $fields = $config->getCMSFields();

Severity: Minor
Found in src/Admin/FoxyStripeAdmin.php - About 25 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

Severity
Category
Status
Source
Language