jaroslavtyc/drd-plus-equipment

View on GitHub
Equipment/Equipment.php

Summary

Maintainability
A
35 mins
Test Coverage

Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        Belongings $belongings,
        BodyArmorCode $wornBodyArmor,
        HelmCode $wornHelm,
        WeaponlikeCode $weaponlikeInMainHand,
        WeaponlikeCode $weaponlikeInOffhand
Severity: Minor
Found in Equipment/Equipment.php - About 35 mins to fix

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

        private $weaponOrShieldInMainHand;
    Severity: Minor
    Found in Equipment/Equipment.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 $weaponOrShieldInOffhand. Keep variable name length under 20.
    Open

        private $weaponOrShieldInOffhand;
    Severity: Minor
    Found in Equipment/Equipment.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 $weaponOrShieldInOffhand. Keep variable name length under 20.
    Open

        public function setWeaponOrShieldInOffhand(WeaponlikeCode $weaponOrShieldInOffhand)
    Severity: Minor
    Found in Equipment/Equipment.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 $weaponOrShieldInMainHand. Keep variable name length under 20.
    Open

        public function setWeaponOrShieldInMainHand(WeaponlikeCode $weaponOrShieldInMainHand)
    Severity: Minor
    Found in Equipment/Equipment.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

    There are no issues that match your filters.

    Category
    Status