public function aroundGetStorageDatabaseModel(Database $subject, $proceed) { if (is_null($this->storageModel)) { if ($subject->checkDbUsage() && $this->helper->checkS3Usage()) { $this->storageModel = $this->s3StorageFactory->create(); } else { $this->storageModel = $this->dbStorageFactory->create(); } } return $this->storageModel; }