Skip to content

Commit 2067634

Browse files
committed
Fix invalid conditions for retrieving Storage services in StorageRegistry
1 parent c12dcb9 commit 2067634

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/StorageRegistry/StorageRegistry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function registerStorage(StorageInterface $storage): void {
4040
* @throws StorageRegistryException
4141
*/
4242
public function getStorageByIdentifier($identifier): StorageInterface {
43-
if (isset($this->registeredStorageServicesByIdentifiers[$identifier])) {
43+
if (!isset($this->registeredStorageServicesByIdentifiers[$identifier])) {
4444
throw new StorageRegistryException("Storage {$identifier} has not been found!");
4545
}
4646

@@ -53,7 +53,7 @@ public function getStorageByIdentifier($identifier): StorageInterface {
5353
* @throws StorageRegistryException
5454
*/
5555
public function getStorageByClass($class): StorageInterface {
56-
if (isset($this->registeredStorageServicesByClass[$class])) {
56+
if (!isset($this->registeredStorageServicesByClass[$class])) {
5757
throw new StorageRegistryException("Storage {$class} has not been found!");
5858
}
5959

0 commit comments

Comments
 (0)