dmitry-kulikov/yii2-braintree

View on GitHub

Showing 265 of 271 total issues

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

    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

    Severity
    Category
    Status
    Source
    Language