GetDKAN/dkan

View on GitHub
modules/datastore/src/Form/DashboardForm.php

Summary

Maintainability
A
2 hrs
Test Coverage
A
96%

File DashboardForm.php has 273 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace Drupal\datastore\Form;

use Drupal\Core\Pager\PagerManagerInterface;
Severity: Minor
Found in modules/datastore/src/Form/DashboardForm.php - About 2 hrs to fix

    Method buildRevisionRow has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

      protected function buildRevisionRow(array $rev, int $resourceCount, string $harvestStatus) {
        // Moderation state can be 'hidden', which is not a good CSS class if we
        // don't want data to be hidden. We hijack the 'registered' class for use
        // here.
        $moderation_class = $rev['moderation_state'];
    Severity: Minor
    Found in modules/datastore/src/Form/DashboardForm.php - About 1 hr to fix

      Method buildFilters has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Wontfix

        protected function buildFilters(array $filters): array {
          // Retrieve potential harvest IDs for "Harvest ID" filter.
          $harvestIds = $this->harvest->getAllHarvestIds();
      
          return [
      Severity: Minor
      Found in modules/datastore/src/Form/DashboardForm.php - About 1 hr to fix

        Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Wontfix

            HarvestService $harvestService,
            DatasetInfo $datasetInfo,
            MetastoreService $metastoreService,
            PagerManagerInterface $pagerManager,
            DateFormatter $dateFormatter,
        Severity: Minor
        Found in modules/datastore/src/Form/DashboardForm.php - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status