src/Shop/Order/Event/DigiDoki.php

Summary

Maintainability
B
5 hrs
Test Coverage

File DigiDoki.php has 288 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

class Shop_Order_Event_DigiDoki extends Shop_Order_Event
{

Severity: Minor
Found in src/Shop/Order/Event/DigiDoki.php - About 2 hrs to fix

    Method transferCommission has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function transferCommission($request, $order)
        {
            $totalCost = $request->REQUEST['total_cost'];
            $spareCost = $request->REQUEST['spare_cost'];
            $commission = ($totalCost - $spareCost) * 0.2;
    Severity: Minor
    Found in src/Shop/Order/Event/DigiDoki.php - About 1 hr to fix

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

          public static function transferCommission($request, $order)
          {
              $totalCost = $request->REQUEST['total_cost'];
              $spareCost = $request->REQUEST['spare_cost'];
              $commission = ($totalCost - $spareCost) * 0.2;
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.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

      Missing class import via use statement (line '216', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('Spare cost is not a valid value: ' . $spareCost);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '258', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('Invalid value for commission. Commission should be a positive value.');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '208', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('spare_cost is required');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '329', column '21').
      Open

              $meta = new Shop_OrderMetafield();
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '183', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('account_id of fixer is required');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '235', column '21').
      Open

              $item = new Shop_OrderItem();
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '205', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('total_cost is required');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '213', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('Total cost is not a valid value: ' . $totalCost);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '283', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('Insufficeint balance [balance: ' . $sourceBalance . ', transfer: ' . $commission . '].');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '267', column '23').
      Open

                  throw new Pluf_Exception_DoesNotExist('You have not any wallet with current currency, so you can not do this action.');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '263', column '23').
      Open

                  throw new Pluf_Exception_SettingError('Local currency of tenant is not set. Set it first.');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '186', column '22').
      Open

              $fixer = new User_Account($fixerId);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '286', column '25').
      Open

              $transfer = new Bank_Transfer();
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '219', column '23').
      Open

                  throw new Pluf_Exception_BadRequest('Total cost could not be lesser than spare cost');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '188', column '23').
      Open

                  throw new Pluf_Exception_DoesNotExist('Determined fixer dose not exist');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Avoid using static access to class 'Pluf' in method 'transferCommission'.
      Open

              Pluf::loadFunction('Pluf_Shortcuts_GetFormForModel');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'User_Precondition' in method 'isZoneOwner'.
      Open

              return User_Precondition::isOwner($request);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'User_Precondition' in method 'isCrm'.
      Open

              return User_Precondition::isOwner($request);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      The method createOrderMetafeild uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  $meta->key = $key;
                  $meta->value = $value;
                  $meta->namespace = $namespace;
                  $meta->order_id = $order;
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      Avoid using static access to class 'Bank_Service' in method 'transferCommission'.
      Open

              $wallets = Bank_Service::getWallets($request->user, $currency);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'User_Precondition' in method 'isWorkshopOwner'.
      Open

              return User_Precondition::isOwner($request);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'Tenant_Service' in method 'transferCommission'.
      Open

              $wId = Tenant_Service::setting('tenant.main_wallet_id', 0);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'Tenant_Service' in method 'transferCommission'.
      Open

              $currency = Tenant_Service::setting('local.currency', NULL);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'Tenant_Service' in method 'transferCommission'.
      Open

                  'description' => Tenant_Service::setting('digidoci.commission_transfer_description', 'DigiDoki commission.') . 'Request ID: ' . $order->id,
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'User_Precondition' in method 'isFixer'.
      Open

              return User_Precondition::isOwner($request);
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'Pluf' in method 'transferCommission'.
      Open

                  Pluf::loadFunction('Pluf_Shortcuts_GetObjectOr404');
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Define a constant instead of duplicating this literal "total_cost" 5 times.
      Open

              'name' => 'total_cost',
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "Shop_Order_Event_DigiDoki" 9 times.
      Open

              'Shop_Order_Event_DigiDoki',
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "visible" 3 times.
      Open

              'visible' => true,
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "spare_cost" 5 times.
      Open

              'name' => 'spare_cost',
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "title" 3 times.
      Open

              'title' => 'Date & Time',
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "description" 6 times.
      Open

              'description' => 'Date and time',
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "validators" 3 times.
      Open

              'validators' => []
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "defaultValue" 3 times.
      Open

              'defaultValue' => '',
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "priority" 3 times.
      Open

              'priority' => 5,
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Define a constant instead of duplicating this literal "editable" 7 times.
      Open

              'editable' => true,
      Severity: Critical
      Found in src/Shop/Order/Event/DigiDoki.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Each class must be in a namespace of at least one level (a top-level vendor name)
      Open

      class Shop_Order_Event_DigiDoki extends Shop_Order_Event

      The class Shop_Order_Event_DigiDoki is not named in CamelCase.
      Open

      class Shop_Order_Event_DigiDoki extends Shop_Order_Event
      {
      
          /*
           * Properties
      Severity: Minor
      Found in src/Shop/Order/Event/DigiDoki.php by phpmd

      CamelCaseClassName

      Since: 0.2

      It is considered best practice to use the CamelCase notation to name classes.

      Example

      class class_name {
      }

      Source

      TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
      Open

              $currency = Tenant_Service::setting('local.currency', NULL);

      Expected 1 blank line at end of file; 2 found
      Open

      }

      TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
      Open

              if($currency == NULL){

      Line exceeds 120 characters; contains 151 characters
      Open

                  'description' => Tenant_Service::setting('digidoci.commission_transfer_description', 'DigiDoki commission.') . 'Request ID: ' . $order->id,

      Line exceeds 120 characters; contains 138 characters
      Open

                  throw new Pluf_Exception_BadRequest('Insufficeint balance [balance: ' . $sourceBalance . ', transfer: ' . $commission . '].');

      Line exceeds 120 characters; contains 131 characters
      Open

                  throw new Pluf_Exception_DoesNotExist('You have not any wallet with current currency, so you can not do this action.');

      Expected 1 space after closing parenthesis; found 0
      Open

              if($currency == NULL){

      Expected 1 space after IF keyword; 0 found
      Open

              if($currency == NULL){

      Class name "Shop_Order_Event_DigiDoki" is not in camel caps format
      Open

      class Shop_Order_Event_DigiDoki extends Shop_Order_Event

      There are no issues that match your filters.

      Category
      Status