jaroslavtyc/drd-plus-therugist-spells

View on GitHub
DrdPlus/Theurgist/Spells/ModifiersTable.php

Summary

Maintainability
C
7 hrs
Test Coverage

Showing 12 of 12 total issues

File ModifiersTable.php has 303 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
declare(strict_types = 1);
 
namespace DrdPlus\Theurgist\Spells;
 
 
Severity: Minor
Found in DrdPlus/Theurgist/Spells/ModifiersTable.php - About 3 hrs to fix

    ModifiersTable has 27 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class ModifiersTable extends AbstractFileTable
    {
    use ToFlatArrayTrait;
     
    /**
    Severity: Minor
    Found in DrdPlus/Theurgist/Spells/ModifiersTable.php - About 3 hrs to fix

      Method getExpectedDataHeaderNamesToTypes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      protected function getExpectedDataHeaderNamesToTypes(): array
      {
      return [
      self::REALM => self::POSITIVE_INTEGER,
      self::REALMS_AFFECTION => self::ARRAY,
      Severity: Minor
      Found in DrdPlus/Theurgist/Spells/ModifiersTable.php - About 1 hr to fix

        The class ModifiersTable has a coupling between objects value of 28. Consider to reduce the number of dependencies under 13.
        Open

        class ModifiersTable extends AbstractFileTable
        {
        use ToFlatArrayTrait;
         
        /**

        Avoid using static access to class '\DrdPlus\Codes\Theurgist\ModifierCode' in method 'getChildModifiers'.
        Open

        return ModifierCode::getIt($modifierValue);

        Avoid using static access to class '\DrdPlus\Codes\Theurgist\FormulaCode' in method 'getFormulaCodes'.
        Open

        return FormulaCode::getIt($formulaValue);

        Avoid using static access to class '\DrdPlus\Codes\Theurgist\FormCode' in method 'getForms'.
        Open

        return FormCode::getIt($formValue);

        Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'getSpellTraitCodes'.
        Open

        return SpellTraitCode::getIt($spellTraitValue);

        Avoid using static access to class '\DrdPlus\Codes\Theurgist\ProfileCode' in method 'getProfiles'.
        Open

        return ProfileCode::getIt($profileValue);

        Avoid using static access to class '\DrdPlus\Codes\Theurgist\ModifierCode' in method 'getParentModifierCodes'.
        Open

        return ModifierCode::getIt($modifierValue);

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

        $numberOfWaypointsValues = $this->getValue($modifierCode, self::NUMBER_OF_WAYPOINTS);

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

        $numberOfSituationsValue = $this->getValue($modifierCode, self::NUMBER_OF_SITUATIONS);
        Category
        Status