SU-HKKU/cardinal_service_profile

View on GitHub
modules/cardinal_service_profile_helper/src/Form/CsvImporterForm.php

Summary

Maintainability
A
0 mins
Test Coverage
A
98%

Method submitForm has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

  public function submitForm(array &$form, FormStateInterface $form_state) {
    $before_count = $this->getNodeCount();
    // Invalidate the migrations so that we can alter the plugin after setting
    // the state for the file path.
    Cache::invalidateTags(['migration_plugins']);

    Method validateForm has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

      public function validateForm(array &$form, FormStateInterface $form_state) {
        parent::validateForm($form, $form_state);
        if ($form_state->getTriggeringElement()['#name'] !== 'import') {
          return;
        }

      Avoid using undefined variables such as '$help' which will lead to PHP notices.
      Open

          $help[] = [

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      Avoid using undefined variables such as '$help' which will lead to PHP notices.
      Open

          $help[] = [

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      Avoid using undefined variables such as '$help' which will lead to PHP notices.
      Open

          return $help;

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      No space found before comment text; expected "// @codeCoverageIgnoreEnd" but found "//@codeCoverageIgnoreEnd"
      Wontfix

          //@codeCoverageIgnoreEnd

      There must be no blank line following an inline comment
      Wontfix

          // @codeCoverageIgnoreEnd

      There are no issues that match your filters.

      Category
      Status