phpmyadmin/phpmyadmin

View on GitHub
src/Config/Settings/Import.php

Summary

Maintainability
C
1 day
Test Coverage

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

final class Import
{
    /**
     * ```php
     * $cfg['Import']['format'] = 'sql';
Severity: Minor
Found in src/Config/Settings/Import.php - About 3 hrs to fix

    File Import.php has 292 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    declare(strict_types=1);
    
    namespace PhpMyAdmin\Config\Settings;
    Severity: Minor
    Found in src/Config/Settings/Import.php - About 3 hrs to fix

      Method asArray has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function asArray(): array
          {
              return [
                  'format' => $this->format,
                  'charset' => $this->charset,
      Severity: Minor
      Found in src/Config/Settings/Import.php - About 1 hr to fix

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

            public function __construct(array $import = [])
            {
                $this->format = $this->setFormat($import);
                $this->charset = $this->setCharset($import);
                $this->allow_interrupt = $this->setAllowInterrupt($import);
        Severity: Minor
        Found in src/Config/Settings/Import.php - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status