diff --git a/src/Form/StyledGoogleMapSettingsForm.php b/src/Form/StyledGoogleMapSettingsForm.php
index 954256299bb74bc4e67921c744848cc77c944d9e..5d39ef324fc8b7173168e4327beef0fd21659495 100644
--- a/src/Form/StyledGoogleMapSettingsForm.php
+++ b/src/Form/StyledGoogleMapSettingsForm.php
@@ -2,8 +2,6 @@
 
 namespace Drupal\styled_google_map\Form;
 
-use Drupal\Core\Asset\LibraryDiscoveryInterface;
-use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\styled_google_map\StyledGoogleMapInterface;
@@ -19,25 +17,13 @@ class StyledGoogleMapSettingsForm extends ConfigFormBase {
    */
   protected $libraryDiscovery;
 
-  /**
-   * StyledGoogleMapSettingsForm constructor.
-   *
-   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
-   * @param \Drupal\Core\Asset\LibraryDiscoveryInterface $library_discovery
-   */
-  public function __construct(ConfigFactoryInterface $config_factory, LibraryDiscoveryInterface $library_discovery) {
-    parent::__construct($config_factory);
-    $this->libraryDiscovery = $library_discovery;
-  }
-
   /**
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container) {
-    return new static(
-      $container->get('config.factory'),
-      $container->get('library.discovery')
-    );
+    $instance = parent::create($container);
+    $instance->libraryDiscovery = $container->get('library.discovery');
+    return $instance;
   }
 
   /**