Completed
Pull Request — master (#1034)
by Maxence
26s
created
lib/Model/SyncedItemLock.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -203,14 +203,14 @@
 block discarded – undo
203 203
 	 * @throws ShareTokenNotFoundException
204 204
 	 */
205 205
 	public function importFromDatabase(array $data, string $prefix = ''): IQueryRow {
206
-		if ($this->get($prefix . 'token', $data) === '') {
206
+		if ($this->get($prefix.'token', $data) === '') {
207 207
 			throw new ShareTokenNotFoundException();
208 208
 		}
209 209
 
210
-		$this->setSingleId($this->get($prefix . 'single_id', $data));
211
-		$this->setUpdateType($this->get($prefix . 'update_type', $data));
212
-		$this->setUpdateTypeId($this->get($prefix . 'update_type_id', $data));
213
-		$this->setTime($this->getInt($prefix . 'time', $data));
210
+		$this->setSingleId($this->get($prefix.'single_id', $data));
211
+		$this->setUpdateType($this->get($prefix.'update_type', $data));
212
+		$this->setUpdateTypeId($this->get($prefix.'update_type_id', $data));
213
+		$this->setTime($this->getInt($prefix.'time', $data));
214 214
 
215 215
 		return $this;
216 216
 	}
Please login to merge, or discard this patch.
lib/Service/FederatedSyncService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
 			$syncedItem
133 133
 		);
134 134
 
135
-		echo 'reached !? ' . json_encode($data) . "\n";
135
+		echo 'reached !? '.json_encode($data)."\n";
136 136
 	}
137 137
 
138 138
 }
Please login to merge, or discard this patch.
lib/Model/SyncedItem.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -260,18 +260,18 @@
 block discarded – undo
260 260
 	 * @throws SyncedItemNotFoundException
261 261
 	 */
262 262
 	public function importFromDatabase(array $data, string $prefix = ''): IQueryRow {
263
-		if ($this->get($prefix . 'single_id', $data) === '') {
263
+		if ($this->get($prefix.'single_id', $data) === '') {
264 264
 			throw new SyncedItemNotFoundException();
265 265
 		}
266 266
 
267
-		$this->setSingleId($this->get($prefix . 'single_id', $data));
268
-		$this->setInstance($this->get($prefix . 'instance', $data));
269
-		$this->setInstance($this->get($prefix . 'instance', $data));
270
-		$this->setAppId($this->get($prefix . 'app_id', $data));
271
-		$this->setItemType($this->get($prefix . 'item_type', $data));
272
-		$this->setItemId($this->get($prefix . 'item_id', $data));
273
-		$this->setChecksum($this->get($prefix . 'checksum', $data));
274
-		$this->setDeleted($this->getBool($prefix . 'deleted', $data));
267
+		$this->setSingleId($this->get($prefix.'single_id', $data));
268
+		$this->setInstance($this->get($prefix.'instance', $data));
269
+		$this->setInstance($this->get($prefix.'instance', $data));
270
+		$this->setAppId($this->get($prefix.'app_id', $data));
271
+		$this->setItemType($this->get($prefix.'item_type', $data));
272
+		$this->setItemId($this->get($prefix.'item_id', $data));
273
+		$this->setChecksum($this->get($prefix.'checksum', $data));
274
+		$this->setDeleted($this->getBool($prefix.'deleted', $data));
275 275
 
276 276
 		if ($this->getInstance() === '') {
277 277
 			$this->setInstance($this->getManager()->getLocalInstance());
Please login to merge, or discard this patch.
lib/Model/SyncedShare.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,12 +133,12 @@
 block discarded – undo
133 133
 	 * @throws SyncedShareNotFoundException
134 134
 	 */
135 135
 	public function importFromDatabase(array $data, string $prefix = ''): IQueryRow {
136
-		if ($this->get($prefix . 'single_id', $data) === '') {
136
+		if ($this->get($prefix.'single_id', $data) === '') {
137 137
 			throw new SyncedShareNotFoundException();
138 138
 		}
139 139
 
140
-		$this->setCircleId($this->get($prefix . 'circle_id', $data));
141
-		$this->setSingleId($this->get($prefix . 'single_id', $data));
140
+		$this->setCircleId($this->get($prefix.'circle_id', $data));
141
+		$this->setSingleId($this->get($prefix.'single_id', $data));
142 142
 
143 143
 		return $this;
144 144
 	}
Please login to merge, or discard this patch.
lib/Tools/Model/ReferencedDataStore.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		try {
235 235
 			$reflection = new ReflectionClass($class);
236 236
 		} catch (ReflectionException $e) {
237
-			throw new InvalidItemException('reflection issue with ' . $class);
237
+			throw new InvalidItemException('reflection issue with '.$class);
238 238
 		}
239 239
 
240 240
 		if (!$reflection->implementsInterface(IDeserializable::class)) {
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 	 * @return string
355 355
 	 */
356 356
 	private function getRef(string $key, string $ref): string {
357
-		return $this->get($key . '.' . $ref, $this->ref);
357
+		return $this->get($key.'.'.$ref, $this->ref);
358 358
 	}
359 359
 
360 360
 	/**
Please login to merge, or discard this patch.
lib/Model/Debug.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -242,16 +242,16 @@
 block discarded – undo
242 242
 	 * @throws InvalidItemException
243 243
 	 */
244 244
 	public function importFromDatabase(array $data, string $prefix = ''): IQueryRow {
245
-		if (empty($this->getArray($prefix . 'debug', $data))) {
245
+		if (empty($this->getArray($prefix.'debug', $data))) {
246 246
 			throw new InvalidItemException();
247 247
 		}
248 248
 
249
-		$this->setId($this->getInt($prefix . 'id', $data));
250
-		$this->setThread($this->get($prefix . 'thread', $data));
251
-		$this->setType($this->get($prefix . 'type', $data));
252
-		$this->setCircleId($this->get($prefix . 'circle_id', $data));
253
-		$this->setInstance($this->get($prefix . 'instance', $data));
254
-		$this->setTime($this->getInt($prefix . 'time', $data));
249
+		$this->setId($this->getInt($prefix.'id', $data));
250
+		$this->setThread($this->get($prefix.'thread', $data));
251
+		$this->setType($this->get($prefix.'type', $data));
252
+		$this->setCircleId($this->get($prefix.'circle_id', $data));
253
+		$this->setInstance($this->get($prefix.'instance', $data));
254
+		$this->setTime($this->getInt($prefix.'time', $data));
255 255
 
256 256
 		/** @var ReferencedDataStore $store */
257 257
 		$store = $this->deserialize($this->getArray('debug', $data), ReferencedDataStore::class);
Please login to merge, or discard this patch.
lib/Service/DebugService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
 
146 146
 		$msg = $e->getMessage();
147 147
 		$store = new ReferencedDataStore();
148
-		$store->s(self::ACTION, '{?' . self::E_CLASS . '}' . (($msg !== '') ? ' (' . $msg . ')' : ''));
148
+		$store->s(self::ACTION, '{?'.self::E_CLASS.'}'.(($msg !== '') ? ' ('.$msg.')' : ''));
149 149
 		$store->s(self::E_CLASS, get_class($e));
150 150
 		$store->s(self::EXCEPTION, $e->getMessage());
151 151
 		$store->sArray(self::E_TRACE, debug_backtrace());
Please login to merge, or discard this patch.
lib/Service/SignedControllerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 	 */
135 135
 	public function extractObjectFromRequest(
136 136
 		string $class,
137
-		?NCSignedRequest &$signed = null
137
+		?NCSignedRequest & $signed = null
138 138
 	): IDeserializable {
139 139
 		$signed = $this->remoteStreamService->incomingSignedRequest();
140 140
 		$this->confirmRemoteInstance($signed);
Please login to merge, or discard this patch.
lib/Service/FederatedSyncShareService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 	public function confirmRemoteInstanceAccess(string $syncedId, string $instance): void {
286 286
 		$circleIds = array_values(
287 287
 			array_map(
288
-				function (SyncedShare $share): string {
288
+				function(SyncedShare $share): string {
289 289
 					return $share->getCircleId();
290 290
 				},
291 291
 				$this->syncedShareRequest->getShares($syncedId)
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 		// federated circles only works as root, so sub-circles cannot spread on multiple instances.
298 298
 		$links = $this->memberRequest->getLinksWithInstance($instance, $circleIds);
299 299
 		$this->debugService->info(
300
-			'SyncedItem {singleId} is shared to ' . count($circleIds) . ' circles', '',
300
+			'SyncedItem {singleId} is shared to '.count($circleIds).' circles', '',
301 301
 			[
302 302
 				'syncedId' => $syncedId,
303 303
 				'circleIds' => $circleIds,
Please login to merge, or discard this patch.