chore: Removed trailing spaces and cleaned up code

This commit is contained in:
Aerex
2021-07-05 16:41:38 -05:00
parent 39feb2edb9
commit 0755b84fdd
4 changed files with 33 additions and 33 deletions

View File

@@ -10,8 +10,8 @@ class StorageManager {
* @var Storage[]
*/
private $storages = [];
private $storages = [];
/**
* @var array()
@@ -19,7 +19,11 @@ class StorageManager {
private $configs;
public function __construct($configs){
$this->configs = $configs;
$this->configs = $configs;
}
public function getStorages() {
return $this->storages;
}
public function fromStorageSource(Calendar $calendar) {
@@ -34,21 +38,18 @@ class StorageManager {
return false;
}
public function getStorages() {
return $this->storages;
}
public function getConfigs() {
return $this->configs;
}
public function addStorage($name, $storage) {
$this->storages[$name] = $storage;
$this->storages[$name] = $storage;
}
public function import(Calendar $calendar, string $displayname) {
if (!isset($this->configs)) {
throw new \Exception('StorageManger was not initialize or configs are not defined');
throw new \Exception('StorageManger was not initialize or configs are not defined');
}
foreach ($this->configs['storages'] as $key => $value) {
$storage = $this->storages[$key];
@@ -61,7 +62,7 @@ class StorageManager {
public function remove($uid) {
if (!isset($this->configs)) {
throw new \Exception('StorageManger was not initialize or configs are not defined');
throw new \Exception('StorageManger was not initialize or configs are not defined');
}
foreach ($this->configs['storages'] as $key => $value) {
$storage = $this->storages[$key];
@@ -72,4 +73,3 @@ class StorageManager {
}
}
}