diff --git a/src/ExternalLibrary/Local/LocalLibraryTrait.php b/src/ExternalLibrary/Local/LocalLibraryTrait.php
index 3f08e4ba4c1f2d346aa6158f6594e56ea3034cba..3cb75290295e8a9e03e89374b4512d983cad7d17 100644
--- a/src/ExternalLibrary/Local/LocalLibraryTrait.php
+++ b/src/ExternalLibrary/Local/LocalLibraryTrait.php
@@ -92,8 +92,8 @@ trait LocalLibraryTrait {
     $this->installed = TRUE;
     $this->localPath = (string) $path;
 
-    assert('$this->localPath !== ""');
-    assert('$this->localPath[0] !== "/"');
+    assert($this->localPath !== "");
+    assert($this->localPath[0] !== "/");
   }
 
 }
diff --git a/src/Plugin/libraries/Locator/UriLocator.php b/src/Plugin/libraries/Locator/UriLocator.php
index 348be0c247c8aec40cbba68e28c132437b9c0938..27325050212d7c39d3f2c467d6eb02e072c09650 100644
--- a/src/Plugin/libraries/Locator/UriLocator.php
+++ b/src/Plugin/libraries/Locator/UriLocator.php
@@ -73,7 +73,7 @@ class UriLocator implements LocatorInterface, ContainerFactoryPluginInterface {
   public function locate(LocalLibraryInterface $library) {
     /** @var \Drupal\Core\StreamWrapper\LocalStream $stream_wrapper */
     $stream_wrapper = $this->streamWrapperManager->getViaUri($this->uri);
-    assert('$stream_wrapper instanceof \Drupal\Core\StreamWrapper\LocalStream');
+    assert($stream_wrapper instanceof \Drupal\Core\StreamWrapper\LocalStream);
     // Calling LocalStream::getDirectoryPath() explicitly avoids the realpath()
     // usage in LocalStream::getLocalPath(), which breaks if Libraries API is
     // symbolically linked into the Drupal installation.
diff --git a/src/Plugin/libraries/Type/AssetLibraryType.php b/src/Plugin/libraries/Type/AssetLibraryType.php
index ce0b276b17eb58aa46789392ae6eb6fb92e1c866..a92f27daa09b55166d1d8d7f7fe26dc1329ec6e8 100644
--- a/src/Plugin/libraries/Type/AssetLibraryType.php
+++ b/src/Plugin/libraries/Type/AssetLibraryType.php
@@ -24,7 +24,7 @@ class AssetLibraryType extends LibraryTypeBase implements AttachableAssetLibrary
    * {@inheritdoc}
    */
   public function getAttachableAssetLibraries(LibraryInterface $library, LibraryManagerInterface $library_manager) {
-    assert('$library instanceof \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface');
+    assert($library instanceof \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface);
     /** @var \Drupal\libraries\ExternalLibrary\Asset\AssetLibraryInterface $library */
     return [$library->getId() => $library->getAttachableAssetLibrary($library_manager)];
   }
diff --git a/src/Plugin/libraries/Type/MultipleAssetLibraryType.php b/src/Plugin/libraries/Type/MultipleAssetLibraryType.php
index 31ec6a62c6c41aace30735496788f4f85118900d..f73887e917f22e21bbf8609b7e3f5bc1dc95b06a 100644
--- a/src/Plugin/libraries/Type/MultipleAssetLibraryType.php
+++ b/src/Plugin/libraries/Type/MultipleAssetLibraryType.php
@@ -25,7 +25,7 @@ class MultipleAssetLibraryType extends LibraryTypeBase implements AttachableAsse
    * {@inheritdoc}
    */
   public function getAttachableAssetLibraries(LibraryInterface $external_library, LibraryManagerInterface $library_manager) {
-    assert('$external_library instanceof \Drupal\libraries\ExternalLibrary\Asset\MultipleAssetLibraryInterface');
+    assert($external_library instanceof \Drupal\libraries\ExternalLibrary\Asset\MultipleAssetLibraryInterface);
     /** @var \Drupal\libraries\ExternalLibrary\Asset\MultipleAssetLibraryInterface $external_library */
     $attachable_libraries = [];
     foreach ($external_library->getAttachableAssetLibraries($library_manager) as $component_name => $attachable_library) {