@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $this->storageId = self::adjustStorageId($this->storageId); |
74 | 74 | |
75 | 75 | if ($row = self::getStorageById($this->storageId)) { |
76 | - $this->numericId = (int)$row['numeric_id']; |
|
76 | + $this->numericId = (int) $row['numeric_id']; |
|
77 | 77 | } else { |
78 | 78 | $connection = \OC::$server->getDatabaseConnection(); |
79 | 79 | $available = $isAvailable ? 1 : 0; |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | $this->numericId = $connection->lastInsertId('*PREFIX*storages'); |
82 | 82 | } else { |
83 | 83 | if ($row = self::getStorageById($this->storageId)) { |
84 | - $this->numericId = (int)$row['numeric_id']; |
|
84 | + $this->numericId = (int) $row['numeric_id']; |
|
85 | 85 | } else { |
86 | - throw new \RuntimeException('Storage could neither be inserted nor be selected from the database: ' . $this->storageId); |
|
86 | + throw new \RuntimeException('Storage could neither be inserted nor be selected from the database: '.$this->storageId); |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $storageId = self::adjustStorageId($storageId); |
151 | 151 | |
152 | 152 | if ($row = self::getStorageById($storageId)) { |
153 | - return (int)$row['numeric_id']; |
|
153 | + return (int) $row['numeric_id']; |
|
154 | 154 | } else { |
155 | 155 | return null; |
156 | 156 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function getAvailability() { |
163 | 163 | if ($row = self::getStorageById($this->storageId)) { |
164 | 164 | return [ |
165 | - 'available' => (int)$row['available'] === 1, |
|
165 | + 'available' => (int) $row['available'] === 1, |
|
166 | 166 | 'last_checked' => $row['last_checked'] |
167 | 167 | ]; |
168 | 168 | } else { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | public function setAvailability($isAvailable, int $delay = 0) { |
178 | 178 | $available = $isAvailable ? 1 : 0; |
179 | 179 | if (!$isAvailable) { |
180 | - \OC::$server->get(LoggerInterface::class)->info('Storage with ' . $this->storageId . ' marked as unavailable', ['app' => 'lib']); |
|
180 | + \OC::$server->get(LoggerInterface::class)->info('Storage with '.$this->storageId.' marked as unavailable', ['app' => 'lib']); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | $query = \OC::$server->getDatabaseConnection()->getQueryBuilder(); |