dmitry-kulikov/yii2-braintree

View on GitHub
src/BraintreeForm.php

Summary

Maintainability
D
1 day
Test Coverage

File BraintreeForm.php has 397 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * @author Anton Tuyakhov <atuyakhov@gmail.com>
 */
Severity: Minor
Found in src/BraintreeForm.php - About 5 hrs to fix

    BraintreeForm has 31 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class BraintreeForm extends Model
    {
        public $amount;
        public $orderId;
        public $paymentMethodToken;
    Severity: Minor
    Found in src/BraintreeForm.php - About 3 hrs to fix

      The class BraintreeForm has an overall complexity of 55 which is very high. The configured complexity threshold is 50.
      Open

      class BraintreeForm extends Model
      {
          public $amount;
          public $orderId;
          public $paymentMethodToken;
      Severity: Minor
      Found in src/BraintreeForm.php by phpmd

      The class BraintreeForm has 26 non-getter- and setter-methods. Consider refactoring BraintreeForm to keep number of methods under 25.
      Open

      class BraintreeForm extends Model
      {
          public $amount;
          public $orderId;
          public $paymentMethodToken;
      Severity: Minor
      Found in src/BraintreeForm.php by phpmd

      TooManyMethods

      Since: 0.1

      A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      The default was changed from 10 to 25 in PHPMD 2.3.

      Example

      Source https://phpmd.org/rules/codesize.html#toomanymethods

      The class BraintreeForm has 25 public methods. Consider refactoring BraintreeForm to keep number of public methods under 10.
      Open

      class BraintreeForm extends Model
      {
          public $amount;
          public $orderId;
          public $paymentMethodToken;
      Severity: Minor
      Found in src/BraintreeForm.php by phpmd

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

      Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

      Method rules has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function rules(): array
          {
              return [
                  [['amount'], 'number'],
      
      
      Severity: Major
      Found in src/BraintreeForm.php - About 2 hrs to fix

        Function addErrorFromResponse has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            public function addErrorFromResponse(Error $result)
            {
                $this->lastError = $result;
                $errors = $result->errors;
                foreach ($errors->shallowAll() as $error) {
        Severity: Minor
        Found in src/BraintreeForm.php - About 1 hr 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

        The class BraintreeForm has 37 fields. Consider redesigning BraintreeForm to keep the number of fields under 15.
        Open

        class BraintreeForm extends Model
        {
            public $amount;
            public $orderId;
            public $paymentMethodToken;
        Severity: Minor
        Found in src/BraintreeForm.php by phpmd

        TooManyFields

        Since: 0.1

        Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

        Example

        class Person {
           protected $one;
           private $two;
           private $three;
           [... many more fields ...]
        }

        Source https://phpmd.org/rules/codesize.html#toomanyfields

        Method attributeLabels has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function attributeLabels(): array
            {
                return [
                    'amount' => 'Amount',
                    'orderId' => 'Order ID',
        Severity: Minor
        Found in src/BraintreeForm.php - About 1 hr to fix

          The class BraintreeForm has 67 public methods and attributes. Consider reducing the number of public items to less than 45.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          ExcessivePublicCount

          Since: 0.1

          A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

          Example

          public class Foo {
              public $value;
              public $something;
              public $var;
              // [... more more public attributes ...]
          
              public function doWork() {}
              public function doMoreWork() {}
              public function doWorkAgain() {}
              // [... more more public methods ...]
          }

          Source https://phpmd.org/rules/codesize.html#excessivepubliccount

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

              public function getValuesFromAttributes(): array
              {
                  $values = [];
                  foreach ($this->attributes as $key => $val) {
                      if (!is_object($val) && !is_null($val) && strlen($val) > 0) {
          Severity: Minor
          Found in src/BraintreeForm.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

          Class "BraintreeForm" has 31 methods, which is greater than 20 authorized. Split it into smaller classes.
          Open

          class BraintreeForm extends Model
          Severity: Major
          Found in src/BraintreeForm.php by sonar-php

          A class that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor the class into smaller ones which focus on well defined topics.

          The method createPaymentMethod has a boolean flag argument $makeDefault, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public function createPaymentMethod($customerId, $paymentNonce, $makeDefault = false, $options = []): array
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          BooleanArgumentFlag

          Since: 1.4.0

          A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

          Example

          class Foo {
              public function bar($flag = true) {
              }
          }

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

          The method getAllPlans has a boolean flag argument $allowCaching, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public static function getAllPlans(bool $allowCaching = true): array
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          BooleanArgumentFlag

          Since: 1.4.0

          A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

          Example

          class Foo {
              public function bar($flag = true) {
              }
          }

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

          The method getPlanIds has a boolean flag argument $allowCaching, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public static function getPlanIds(bool $allowCaching = true): array
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          BooleanArgumentFlag

          Since: 1.4.0

          A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

          Example

          class Foo {
              public function bar($flag = true) {
              }
          }

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

          The method getPlanById has a boolean flag argument $allowCaching, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public static function getPlanById(string $planId, bool $allowCaching = true): ?Plan
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          BooleanArgumentFlag

          Since: 1.4.0

          A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

          Example

          class Foo {
              public function bar($flag = true) {
              }
          }

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

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

                      'customer_lastName' => 'Last Name',
          Severity: Critical
          Found in src/BraintreeForm.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 "options" 3 times.
          Open

                              'options' => $options,
          Severity: Critical
          Found in src/BraintreeForm.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 "customerId" 4 times.
          Open

                          ['customerId'],
          Severity: Critical
          Found in src/BraintreeForm.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 "Company Name" 3 times.
          Open

                      'customer_company' => 'Company Name',
          Severity: Critical
          Found in src/BraintreeForm.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 "customer_firstName" 3 times.
          Open

                          ['customer_firstName', 'customer_lastName'],
          Severity: Critical
          Found in src/BraintreeForm.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 "creditCard_expirationDate" 4 times.
          Open

                          ['creditCard_number', 'creditCard_expirationDate', 'creditCard_cvv', 'customerId'],
          Severity: Critical
          Found in src/BraintreeForm.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 "result" 14 times.
          Open

                      $this->addErrorFromResponse($result['result']);
          Severity: Critical
          Found in src/BraintreeForm.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 "First Name" 3 times.
          Open

                      'customer_firstName' => 'First Name',
          Severity: Critical
          Found in src/BraintreeForm.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 "paymentMethodToken" 5 times.
          Open

                          ['amount', 'paymentMethodToken'],
          Severity: Critical
          Found in src/BraintreeForm.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 "amount" 4 times.
          Open

                      [['amount'], 'number'],
          Severity: Critical
          Found in src/BraintreeForm.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 "customer_lastName" 3 times.
          Open

                          ['customer_firstName', 'customer_lastName'],
          Severity: Critical
          Found in src/BraintreeForm.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 "status" 13 times.
          Open

                  if ($result['status'] === false) {
          Severity: Critical
          Found in src/BraintreeForm.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 "creditCard_cvv" 3 times.
          Open

                          ['creditCard_number', 'creditCard_expirationDate', 'creditCard_cvv', 'customerId'],
          Severity: Critical
          Found in src/BraintreeForm.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 "creditCard_number" 6 times.
          Open

                          ['creditCard_number', 'creditCard_expirationDate', 'creditCard_cvv', 'customerId'],
          Severity: Critical
          Found in src/BraintreeForm.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 "required" 5 times.
          Open

                          'required',
          Severity: Critical
          Found in src/BraintreeForm.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.

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_locality
          Open

              public $billing_locality;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of findCustomer() is undeclared type \Braintree\Customer
          Open

              public function findCustomer(string $customerId): Customer
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::searchSubscription()
          Open

              public function searchSubscription($params = []): ResourceCollection
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Reference to instance property success from undeclared class \Braintree\Result\Error
          Open

                  return ['status' => $result->success, 'result' => $result];
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::retryChargeSubscription()
          Open

              public function retryChargeSubscription(string $subscriptionId, $amount)
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero write references to public property \tuyakhov\braintree\BraintreeForm->paymentMethodToken
          Open

              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->creditCard_expirationDate
          Open

              public $creditCard_expirationDate;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero write references to public property \tuyakhov\braintree\BraintreeForm->customer_lastName
          Open

              public $customer_lastName;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Call to undeclared method \tuyakhov\braintree\BraintreeForm::addError
          Open

                          $this->addError('creditCard_number', $error->message);
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Class extends undeclared class \yii\base\Model
          Open

          class BraintreeForm extends Model
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->customer_company
          Open

              public $customer_company;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->customer_phone
          Open

              public $customer_phone;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_company
          Open

              public $billing_company;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::send()
          Open

              public function send()
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::deletePaymentMethod()
          Open

              public function deletePaymentMethod($paymentMethodToken): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::getPlanIds()
          Open

              public static function getPlanIds(bool $allowCaching = true): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero write references to public property \tuyakhov\braintree\BraintreeForm->planId
          Open

              public $planId;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_region
          Open

              public $billing_region;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_countryCodeAlpha2
          Open

              public $billing_countryCodeAlpha2;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_streetAddress
          Open

              public $shipping_streetAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::getAllPlans()
          Open

              public static function getAllPlans(bool $allowCaching = true): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of getPlanById() is undeclared type ?\Braintree\Plan
          Open

              public static function getPlanById(string $planId, bool $allowCaching = true): ?Plan
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_streetAddress
          Open

              public $billing_streetAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_extendedAddress
          Open

              public $shipping_extendedAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Call to undeclared method \tuyakhov\braintree\BraintreeForm::getScenario
          Open

                  $scenario = $this->getScenario();
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Return type of getPlanById() is undeclared type \Braintree\Plan
          Open

              public static function getPlanById(string $planId, bool $allowCaching = true): ?Plan
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of findMerchant() is undeclared type \Braintree\MerchantAccount
          Open

              public function findMerchant(string $merchantId): MerchantAccount
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of findSubscription() is undeclared type \Braintree\Subscription
          Open

              public function findSubscription(string $subscriptionId): Subscription
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::searchTransaction()
          Open

              public function searchTransaction($params = []): ResourceCollection
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Call to undeclared method \tuyakhov\braintree\BraintreeForm::addError
          Open

                      $this->addError('creditCard_number', $error->message);
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Call to undeclared method \tuyakhov\braintree\BraintreeForm::addError
          Open

                                  $this->addError($key . '_' . $error->attribute, $error->message);
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->amount
          Open

              public $amount;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_postalCode
          Open

              public $billing_postalCode;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_lastName
          Open

              public $shipping_lastName;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of searchTransaction() is undeclared type \Braintree\ResourceCollection
          Open

              public function searchTransaction($params = []): ResourceCollection
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::parseWebhookNotification()
          Open

              public function parseWebhookNotification(string $signature, $payload): WebhookNotification
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Reference to instance property message from undeclared class \Braintree\Result\Error
          Open

                      $this->addError('creditCard_number', $result->message);
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->orderId
          Open

              public $orderId;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->customer_fax
          Open

              public $customer_fax;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::rules()
          Open

              public function rules(): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::findSubscription()
          Open

              public function findSubscription(string $subscriptionId): Subscription
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Reference to instance property errors from undeclared class \Braintree\Result\Error
          Open

                  $errors = $result->errors;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero write references to public property \tuyakhov\braintree\BraintreeForm->customer_firstName
          Open

              public $customer_firstName;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->customer_website
          Open

              public $customer_website;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->customer_email
          Open

              public $customer_email;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->customerId
          Open

              public $customerId;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_extendedAddress
          Open

              public $billing_extendedAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Reference to undeclared property \tuyakhov\braintree\BraintreeForm->attributes
          Open

                  foreach ($this->attributes as $key => $val) {
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_locality
          Open

              public $shipping_locality;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::createPaymentMethod()
          Open

              public function createPaymentMethod($customerId, $paymentNonce, $makeDefault = false, $options = []): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::updatePaymentMethod()
          Open

              public function updatePaymentMethod(string $paymentMethodToken, array $params = [], array $options = []): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::createCustomerWithPaymentMethod()
          Open

              public function createCustomerWithPaymentMethod(string $paymentNonce, array $options = []): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::getPlanById()
          Open

              public static function getPlanById(string $planId, bool $allowCaching = true): ?Plan
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::address()
          Open

              public function address()
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::findMerchant()
          Open

              public function findMerchant(string $merchantId): MerchantAccount
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Reference to instance property success from undeclared class \Braintree\Result\Error
          Open

                  return ['status' => $result->success, 'result' => $result];
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->creditCard_cardholderName
          Open

              public $creditCard_cardholderName;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_postalCode
          Open

              public $shipping_postalCode;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::attributeLabels()
          Open

              public function attributeLabels(): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::customer()
          Open

              public function customer()
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::creditCard()
          Open

              public function creditCard()
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->creditCard_cvv
          Open

              public $creditCard_cvv;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::updateSubscription()
          Open

              public function updateSubscription(string $subscriptionId, array $params): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_countryCodeAlpha2
          Open

              public $shipping_countryCodeAlpha2;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of getAllPlans() is undeclared type \Braintree\Plan[]
          Open

              public static function getAllPlans(bool $allowCaching = true): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::createSubscription()
          Open

              public function createSubscription(array $params = []): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->creditCard_expirationMonth
          Open

              public $creditCard_expirationMonth;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_firstName
          Open

              public $shipping_firstName;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_region
          Open

              public $shipping_region;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Property \tuyakhov\braintree\BraintreeForm->lastError has undeclared type \Braintree\Result\Error (Did you mean class \Error)
          Open

              public $lastError;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Reference to static property app from undeclared class \Yii
          Open

                  return Yii::$app->get('braintree');
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::sale()
          Open

              public function sale()
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::saleFromVault()
          Open

              public function saleFromVault()
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of parseWebhookNotification() is undeclared type \Braintree\WebhookNotification
          Open

              public function parseWebhookNotification(string $signature, $payload): WebhookNotification
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Parameter $result has undeclared type \Braintree\Result\Error (Did you mean class \Error)
          Open

              public function addErrorFromResponse(Error $result)
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Call to undeclared method \tuyakhov\braintree\BraintreeForm::addError
          Open

                      $this->addError('creditCard_number', $result->message);
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_firstName
          Open

              public $billing_firstName;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->billing_lastName
          Open

              public $billing_lastName;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->shipping_company
          Open

              public $shipping_company;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero read references to public property \tuyakhov\braintree\BraintreeForm->lastError
          Open

              public $lastError;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::saleWithPaymentNonce()
          Open

              public function saleWithPaymentNonce($amount, $paymentMethodNonce)
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::findCustomer()
          Open

              public function findCustomer(string $customerId): Customer
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::cancelSubscription()
          Open

              public function cancelSubscription(string $subscriptionId): array
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Reference to instance property success from undeclared class \Braintree\Result\Error
          Open

                  return ['status' => $result->success, 'result' => $result];
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to use statement for classlike/namespace ValidationErrorCollection (\Braintree\Error\ValidationErrorCollection)
          Open

          use Braintree\Error\ValidationErrorCollection;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Call to undeclared method \tuyakhov\braintree\BraintreeForm::hasErrors
          Open

                  if (!$this->hasErrors()) {
          Severity: Critical
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->creditCard_number
          Open

              public $creditCard_number;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public property \tuyakhov\braintree\BraintreeForm->creditCard_expirationYear
          Open

              public $creditCard_expirationYear;
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Possibly zero references to public method \tuyakhov\braintree\BraintreeForm::saleWithServiceFee()
          Open

              public function saleWithServiceFee($merchantAccountId, $amount, $paymentMethodNonce, $serviceFeeAmount)
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Return type of searchSubscription() is undeclared type \Braintree\ResourceCollection
          Open

              public function searchSubscription($params = []): ResourceCollection
          Severity: Minor
          Found in src/BraintreeForm.php by phan

          Avoid excessively long variable names like $billing_streetAddress. Keep variable name length under 20.
          Open

              public $billing_streetAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $shipping_countryCodeAlpha2. Keep variable name length under 20.
          Open

              public $shipping_countryCodeAlpha2;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $creditCard_cardholderName. Keep variable name length under 20.
          Open

              public $creditCard_cardholderName;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $creditCard_expirationYear. Keep variable name length under 20.
          Open

              public $creditCard_expirationYear;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $shipping_streetAddress. Keep variable name length under 20.
          Open

              public $shipping_streetAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $creditCard_expirationMonth. Keep variable name length under 20.
          Open

              public $creditCard_expirationMonth;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $creditCard_expirationDate. Keep variable name length under 20.
          Open

              public $creditCard_expirationDate;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $billing_countryCodeAlpha2. Keep variable name length under 20.
          Open

              public $billing_countryCodeAlpha2;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $shipping_extendedAddress. Keep variable name length under 20.
          Open

              public $shipping_extendedAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          Avoid excessively long variable names like $billing_extendedAddress. Keep variable name length under 20.
          Open

              public $billing_extendedAddress;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          LongVariable

          Since: 0.2

          Detects when a field, formal or local variable is declared with a long name.

          Example

          class Something {
              protected $reallyLongIntName = -3; // VIOLATION - Field
              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                  $otherReallyLongName = -5; // VIOLATION - Local
                  for ($interestingIntIndex = 0; // VIOLATION - For
                       $interestingIntIndex < 10;
                       $interestingIntIndex++ ) {
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#longvariable

          The property $creditCard_expirationDate is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_region is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_countryCodeAlpha2 is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_lastName is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_firstName is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_locality is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_streetAddress is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $customer_phone is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $customer_email is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_postalCode is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_streetAddress is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_postalCode is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $creditCard_expirationMonth is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $creditCard_cardholderName is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_extendedAddress is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_extendedAddress is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_company is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_lastName is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_region is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $customer_lastName is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $customer_company is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $customer_website is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $customer_firstName is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $creditCard_expirationYear is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $creditCard_cvv is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_countryCodeAlpha2 is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $customer_fax is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_locality is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $shipping_company is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $creditCard_number is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          The property $billing_firstName is not named in camelCase.
          Open

          class BraintreeForm extends Model
          {
              public $amount;
              public $orderId;
              public $paymentMethodToken;
          Severity: Minor
          Found in src/BraintreeForm.php by phpmd

          CamelCasePropertyName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name attributes.

          Example

          class ClassName {
              protected $property_name;
          }

          Source

          There are no issues that match your filters.

          Category
          Status