jaroslavtyc/drd-plus-properties-by-levels

View on GitHub

Showing 22 of 22 total issues

PropertiesByLevels has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

class PropertiesByLevels extends StrictObject implements BaseProperties
{

    /** @var FirstLevelProperties */
    private $firstLevelProperties;
Severity: Minor
Found in DrdPlus/PropertiesByLevels/PropertiesByLevels.php - About 3 hrs to fix

    FirstLevelProperties has 28 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class FirstLevelProperties extends StrictObject
    {
        const INITIAL_PROPERTY_INCREASE_LIMIT = 3;
    
        /** @var PropertiesByFate */
    Severity: Minor
    Found in DrdPlus/PropertiesByLevels/FirstLevelProperties.php - About 3 hrs to fix

      Method I_can_create_properties_for_any_combination has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function I_can_create_properties_for_any_combination(
              Race $race,
              GenderCode $genderCode,
              PropertiesByFate $propertiesByFate,
              ProfessionLevels $professionLevels,
      Severity: Major
      Found in DrdPlus/Tests/PropertiesByLevels/PropertiesByLevelsTest.php - About 2 hrs to fix

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

            public function I_can_get_every_property_both_limited_and_unlimited(
                int $strength,
                int $agility,
                int $knack,
                int $will,
        Severity: Major
        Found in DrdPlus/Tests/PropertiesByLevels/FirstLevelPropertiesTest.php - About 2 hrs to fix

          Method __construct has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function __construct(
                  Race $race,
                  GenderCode $genderCode,
                  PropertiesByFate $propertiesByFate,
                  ProfessionLevels $professionLevels,
          Severity: Major
          Found in DrdPlus/PropertiesByLevels/PropertiesByLevels.php - About 2 hrs to fix

            File PropertiesByLevelsTest.php has 262 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php declare(strict_types=1);
            
            namespace DrdPlus\Tests\PropertiesByLevels;
            
            use DrdPlus\Codes\GenderCode;
            Severity: Minor
            Found in DrdPlus/Tests/PropertiesByLevels/PropertiesByLevelsTest.php - About 2 hrs to fix

              Method createProfessionLevels has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function createProfessionLevels()
                  {
                      $professionLevels = \Mockery::mock(ProfessionLevels::class);
                      $professionLevels->shouldReceive('getFirstLevelPropertyModifier')
                          ->with(PropertyCode::STRENGTH)
              Severity: Major
              Found in DrdPlus/Tests/PropertiesByLevels/PropertiesByLevelsTest.php - About 2 hrs to fix

                File FirstLevelProperties.php has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php declare(strict_types=1);
                
                namespace DrdPlus\PropertiesByLevels;
                
                use DrdPlus\Codes\GenderCode;
                Severity: Minor
                Found in DrdPlus/PropertiesByLevels/FirstLevelProperties.php - About 2 hrs to fix

                  Method I_can_create_properties_for_any_combination has 15 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          Race $race,
                          GenderCode $genderCode,
                          PropertiesByFate $propertiesByFate,
                          ProfessionLevels $professionLevels,
                          Tables $tables,
                  Severity: Major
                  Found in DrdPlus/Tests/PropertiesByLevels/PropertiesByLevelsTest.php - About 1 hr to fix

                    Method createPropertiesByFate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function createPropertiesByFate()
                        {
                            $propertiesByFate = \Mockery::mock(PropertiesByFate::class);
                            $propertiesByFate->shouldReceive('getProperty')
                                ->with(PropertyCode::getIt(PropertyCode::STRENGTH))
                    Severity: Minor
                    Found in DrdPlus/Tests/PropertiesByLevels/PropertiesByLevelsTest.php - About 1 hr to fix

                      Method createPropertiesByFate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function createPropertiesByFate(
                              int $strength,
                              int $agility,
                              int $knack,
                              int $will,
                      Severity: Minor
                      Found in DrdPlus/Tests/PropertiesByLevels/FirstLevelPropertiesTest.php - About 1 hr to fix

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

                                Race $race,
                                GenderCode $genderCode,
                                PropertiesByFate $propertiesByFate,
                                ProfessionLevels $professionLevels,
                                BodyWeightInKg $weightInKgAdjustment,
                        Severity: Major
                        Found in DrdPlus/PropertiesByLevels/PropertiesByLevels.php - About 1 hr to fix

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

                                  Race $race,
                                  GenderCode $genderCode,
                                  PropertiesByFate $propertiesByFate,
                                  ProfessionLevels $professionLevels,
                                  BodyWeightInKg $weightInKgAdjustment,
                          Severity: Major
                          Found in DrdPlus/PropertiesByLevels/FirstLevelProperties.php - About 1 hr to fix

                            Method createPropertiesByFate has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    int $strength,
                                    int $agility,
                                    int $knack,
                                    int $will,
                                    int $intelligence,
                            Severity: Minor
                            Found in DrdPlus/Tests/PropertiesByLevels/FirstLevelPropertiesTest.php - About 45 mins to fix

                              Method calculateFirstLevelBaseProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      PropertyCode $propertyCode,
                                      Race $race,
                                      GenderCode $genderCode,
                                      Tables $tables,
                                      PropertiesByFate $propertiesByFate,
                              Severity: Minor
                              Found in DrdPlus/PropertiesByLevels/FirstLevelProperties.php - About 45 mins to fix

                                Method createProfessionLevels has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    private function createProfessionLevels($strength, $agility, $knack, $will, $intelligence, $charisma)
                                Severity: Minor
                                Found in DrdPlus/Tests/PropertiesByLevels/NextLevelsPropertiesTest.php - About 45 mins to fix

                                  Method I_can_get_every_property_both_limited_and_unlimited has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          int $strength,
                                          int $agility,
                                          int $knack,
                                          int $will,
                                          int $intelligence,
                                  Severity: Minor
                                  Found in DrdPlus/Tests/PropertiesByLevels/FirstLevelPropertiesTest.php - About 45 mins to fix

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

                                            Race $race,
                                            GenderCode $genderCode,
                                            PropertiesByFate $propertiesByFate,
                                            ProfessionLevels $professionLevels,
                                            Tables $tables
                                    Severity: Minor
                                    Found in DrdPlus/PropertiesByLevels/FirstLevelProperties.php - About 35 mins to fix

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

                                              Race $race,
                                              GenderCode $genderCode,
                                              Tables $tables,
                                              PropertiesByFate $propertiesByFate,
                                              ProfessionLevels $professionLevels
                                      Severity: Minor
                                      Found in DrdPlus/PropertiesByLevels/FirstLevelProperties.php - About 35 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                return $propertiesByFate;
                                        Severity: Major
                                        Found in DrdPlus/Tests/PropertiesByLevels/FirstLevelPropertiesTest.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language