FrankProjects/UltimateWarfare

View on GitHub
src/Controller/Game/ConstructionController.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method constructGameUnits has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function constructGameUnits(Request $request, int $regionId, int $gameUnitTypeId): Response
    {
        /**
         * XXX TODO: Fix unit info page
         * XXX TODO: Fix buildtime to human readable format
Severity: Minor
Found in src/Controller/Game/ConstructionController.php - About 1 hr to fix

    Method removeGameUnits has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function removeGameUnits(Request $request, int $regionId, int $gameUnitTypeId): Response
        {
            try {
                $worldRegion = $this->regionActionService->getWorldRegionByIdAndPlayer($regionId, $this->getPlayer());
            } catch (WorldRegionNotFoundException $e) {
    Severity: Minor
    Found in src/Controller/Game/ConstructionController.php - About 1 hr to fix

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

              ConstructionRepository $constructionRepository,
              GameUnitTypeRepository $gameUnitTypeRepository,
              WorldRegionRepository $worldRegionRepository,
              ConstructionActionService $constructionActionService,
              RegionActionService $regionActionService
      Severity: Minor
      Found in src/Controller/Game/ConstructionController.php - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status