Problem/Motivation

In src/Form/SettingsForm.php the call of Config::get use two parameters, but it accept only one the name of config here is the doc page Config::get

and also there are some Drupal best practice issues:

$ drupalcsp modules/contrib/leaflet_more_maps/

FILE: modules/contrib/leaflet_more_maps/leaflet_more_maps.module
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------
 11 | WARNING | Global constants should not be used, move it to a class or interface
 91 | WARNING | There must be no blank line following an inline comment
------------------------------------------------------------------------------------------------------------


FILE: modules/contrib/leaflet_more_maps/src/Form/SettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 35 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 44 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Comments

berramou created an issue. See original summary.

berramou’s picture

StatusFileSize
new6.04 KB

  • RdeBoer committed e2fd03a on 2.1.x authored by berramou
    Issue #3197945 by berramou: Fix Config::get call and fix Drupal best...
rdeboer’s picture

Patch applied.
Thanks @berramou -- sorry for the late response, somehow email notifications didn't come through for this module.

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Fixed
berramou’s picture

Welcome @RdeBoer, no problem :)

berramou’s picture

Status: Fixed » Closed (fixed)