Skip to content

Commit

Permalink
Optimize code to PHP8
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored Jul 29, 2023
1 parent 3cf6892 commit 6769a0c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/Mount/MountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,7 @@ public function __construct(
private function getRootStorageId(): int {
if ($this->rootStorageId === null) {
$cached = $this->cache->get("root_storage_id");
if ($cached !== null) {
$this->rootStorageId = $cached;
} else {
$id = $this->getRootFolder()->getStorage()->getCache()->getNumericStorageId();
$this->cache->set("root_storage_id", $id);
$this->rootStorageId = $id;
}
$this->rootStorageId = $cached ??= $this->getRootFolder()?->getStorage()?->getCache()?->getNumericStorageId();
}
return $this->rootStorageId;
}
Expand Down

0 comments on commit 6769a0c

Please sign in to comment.