From 130a7740a2679e408ce225b4fd72a73bb79f21ce Mon Sep 17 00:00:00 2001
From: Tim Bozeman <tim@timbozeman.com>
Date: Thu, 13 Feb 2025 13:39:34 -0800
Subject: [PATCH] Issue #3506574 by tim bozeman: Private methods throwing an
 error

---
 src/Asset.php | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/Asset.php b/src/Asset.php
index f0315c1..bf587f3 100644
--- a/src/Asset.php
+++ b/src/Asset.php
@@ -15,15 +15,11 @@ use Drupal\component_library\Entity\ComponentLibraryAsset;
  */
 class Asset {
 
-  private FileSystemInterface $fileSystem;
-  private ConfigFactoryInterface $configFactory;
-  private LibraryDiscoveryInterface $libraryDiscovery;
-
-  public function __construct(FileSystemInterface $file_system, LibraryDiscoveryInterface $library_discovery, ConfigFactoryInterface $config_factory) {
-    $this->fileSystem = $file_system;
-    $this->configFactory = $config_factory;
-    $this->libraryDiscovery = $library_discovery;
-  }
+  public function __construct(
+    protected FileSystemInterface $fileSystem,
+    protected LibraryDiscoveryInterface $libraryDiscovery,
+    protected ConfigFactoryInterface $configFactory,
+  ) {}
 
   /**
    * Generate library files.
-- 
GitLab