Completed
Push — master ( 5d14f8...2337bd )
by Robin
27:19 queued 16s
created
tests/lib/Authentication/Token/ManagerTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	public function testGenerateTokenTooLongName(): void {
101 101
 		$token = $this->createMock(IToken::class);
102 102
 		$token->method('getName')
103
-			->willReturn(str_repeat('a', 120) . '…');
103
+			->willReturn(str_repeat('a', 120).'…');
104 104
 
105 105
 
106 106
 		$this->publicKeyTokenProvider->expects($this->once())
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 				'uid',
111 111
 				'loginName',
112 112
 				'password',
113
-				str_repeat('a', 120) . '…',
113
+				str_repeat('a', 120).'…',
114 114
 				IToken::TEMPORARY_TOKEN,
115 115
 				IToken::REMEMBER
116 116
 			)->willReturn($token);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	}
159 159
 
160 160
 	#[\PHPUnit\Framework\Attributes\DataProvider('tokenData')]
161
-	public function testUpdateToken(IToken|string $token): void {
161
+	public function testUpdateToken(IToken | string $token): void {
162 162
 		if (is_string($token)) {
163 163
 			$token = $this->createMock($token);
164 164
 		}
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	}
172 172
 
173 173
 	#[\PHPUnit\Framework\Attributes\DataProvider('tokenData')]
174
-	public function testUpdateTokenActivity(IToken|string $token): void {
174
+	public function testUpdateTokenActivity(IToken | string $token): void {
175 175
 		if (is_string($token)) {
176 176
 			$token = $this->createMock($token);
177 177
 		}
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	}
185 185
 
186 186
 	#[\PHPUnit\Framework\Attributes\DataProvider('tokenData')]
187
-	public function testGetPassword(IToken|string $token): void {
187
+	public function testGetPassword(IToken | string $token): void {
188 188
 		if (is_string($token)) {
189 189
 			$token = $this->createMock($token);
190 190
 		}
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	}
200 200
 
201 201
 	#[\PHPUnit\Framework\Attributes\DataProvider('tokenData')]
202
-	public function testSetPassword(IToken|string $token): void {
202
+	public function testSetPassword(IToken | string $token): void {
203 203
 		if (is_string($token)) {
204 204
 			$token = $this->createMock($token);
205 205
 		}
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 		$this->publicKeyTokenProvider
375 375
 			->expects($this->exactly(2))
376 376
 			->method('invalidateTokenById')
377
-			->willReturnCallback(function () use (&$calls): void {
377
+			->willReturnCallback(function() use (&$calls): void {
378 378
 				$expected = array_shift($calls);
379 379
 				$this->assertEquals($expected, func_get_args());
380 380
 			});
Please login to merge, or discard this patch.
tests/lib/ErrorHandlerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,17 +60,17 @@
 block discarded – undo
60 60
 	 */
61 61
 	#[\PHPUnit\Framework\Attributes\DataProvider('passwordProvider')]
62 62
 	public function testRemovePasswordFromError($username, $password): void {
63
-		$url = 'http://' . $username . ':' . $password . '@owncloud.org';
63
+		$url = 'http://'.$username.':'.$password.'@owncloud.org';
64 64
 		$expectedResult = 'http://xxx:[email protected]';
65 65
 		$this->logger->expects(self::once())
66 66
 			->method('log')
67 67
 			->with(
68 68
 				ILogger::ERROR,
69
-				'Could not reach ' . $expectedResult . ' at file#4',
69
+				'Could not reach '.$expectedResult.' at file#4',
70 70
 				['app' => 'PHP'],
71 71
 			);
72 72
 
73
-		$result = $this->errorHandler->onError(E_USER_ERROR, 'Could not reach ' . $url, 'file', 4);
73
+		$result = $this->errorHandler->onError(E_USER_ERROR, 'Could not reach '.$url, 'file', 4);
74 74
 
75 75
 		self::assertTrue($result);
76 76
 	}
Please login to merge, or discard this patch.
tests/lib/L10N/FactoryTest.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 		$factory->expects(self::once())
287 287
 			->method('findL10nDir')
288 288
 			->with($app)
289
-			->willReturn(\OC::$SERVERROOT . '/tests/data/l10n/');
289
+			->willReturn(\OC::$SERVERROOT.'/tests/data/l10n/');
290 290
 
291 291
 		self::assertEqualsCanonicalizing(['cs', 'de', 'en', 'ru'], $factory->findAvailableLanguages($app));
292 292
 	}
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 		$factory->expects(self::once())
313 313
 			->method('findL10nDir')
314 314
 			->with($app)
315
-			->willReturn($this->serverRoot . '/apps/files/l10n/');
315
+			->willReturn($this->serverRoot.'/apps/files/l10n/');
316 316
 		$this->config
317 317
 			->expects(self::once())
318 318
 			->method('getSystemValueString')
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 			->willReturn($availableLanguages);
379 379
 
380 380
 		$factory->expects(self::any())
381
-			->method('respectDefaultLanguage')->willReturnCallback(function ($app, $lang) {
381
+			->method('respectDefaultLanguage')->willReturnCallback(function($app, $lang) {
382 382
 				return $lang;
383 383
 			});
384 384
 
@@ -397,13 +397,13 @@  discard block
 block discarded – undo
397 397
 
398 398
 	public static function dataGetL10nFilesForApp(): array {
399 399
 		return [
400
-			['', 'de', [\OC::$SERVERROOT . '/core/l10n/de.json']],
401
-			['core', 'ru', [\OC::$SERVERROOT . '/core/l10n/ru.json']],
402
-			['lib', 'ru', [\OC::$SERVERROOT . '/lib/l10n/ru.json']],
403
-			['settings', 'de', [\OC::$SERVERROOT . '/apps/settings/l10n/de.json']],
404
-			['files', 'de', [\OC::$SERVERROOT . '/apps/files/l10n/de.json']],
400
+			['', 'de', [\OC::$SERVERROOT.'/core/l10n/de.json']],
401
+			['core', 'ru', [\OC::$SERVERROOT.'/core/l10n/ru.json']],
402
+			['lib', 'ru', [\OC::$SERVERROOT.'/lib/l10n/ru.json']],
403
+			['settings', 'de', [\OC::$SERVERROOT.'/apps/settings/l10n/de.json']],
404
+			['files', 'de', [\OC::$SERVERROOT.'/apps/files/l10n/de.json']],
405 405
 			['files', '_lang_never_exists_', []],
406
-			['_app_never_exists_', 'de', [\OC::$SERVERROOT . '/core/l10n/de.json']],
406
+			['_app_never_exists_', 'de', [\OC::$SERVERROOT.'/core/l10n/de.json']],
407 407
 		];
408 408
 	}
409 409
 
@@ -415,11 +415,11 @@  discard block
 block discarded – undo
415 415
 	#[\PHPUnit\Framework\Attributes\DataProvider('dataGetL10nFilesForApp')]
416 416
 	public function testGetL10nFilesForApp($app, $lang, $expected): void {
417 417
 		$factory = $this->getFactory();
418
-		if (in_array($app, ['settings','files'])) {
418
+		if (in_array($app, ['settings', 'files'])) {
419 419
 			$this->appManager
420 420
 				->method('getAppPath')
421 421
 				->with($app)
422
-				->willReturn(\OC::$SERVERROOT . '/apps/' . $app);
422
+				->willReturn(\OC::$SERVERROOT.'/apps/'.$app);
423 423
 		} else {
424 424
 			$this->appManager
425 425
 				->method('getAppPath')
@@ -431,12 +431,12 @@  discard block
 block discarded – undo
431 431
 
432 432
 	public static function dataFindL10NDir(): array {
433 433
 		return [
434
-			['', \OC::$SERVERROOT . '/core/l10n/'],
435
-			['core', \OC::$SERVERROOT . '/core/l10n/'],
436
-			['lib', \OC::$SERVERROOT . '/lib/l10n/'],
437
-			['settings', \OC::$SERVERROOT . '/apps/settings/l10n/'],
438
-			['files', \OC::$SERVERROOT . '/apps/files/l10n/'],
439
-			['_app_never_exists_', \OC::$SERVERROOT . '/core/l10n/'],
434
+			['', \OC::$SERVERROOT.'/core/l10n/'],
435
+			['core', \OC::$SERVERROOT.'/core/l10n/'],
436
+			['lib', \OC::$SERVERROOT.'/lib/l10n/'],
437
+			['settings', \OC::$SERVERROOT.'/apps/settings/l10n/'],
438
+			['files', \OC::$SERVERROOT.'/apps/files/l10n/'],
439
+			['_app_never_exists_', \OC::$SERVERROOT.'/core/l10n/'],
440 440
 		];
441 441
 	}
442 442
 
@@ -448,11 +448,11 @@  discard block
 block discarded – undo
448 448
 	#[\PHPUnit\Framework\Attributes\DataProvider('dataFindL10NDir')]
449 449
 	public function testFindL10NDir($app, $expected): void {
450 450
 		$factory = $this->getFactory();
451
-		if (in_array($app, ['settings','files'])) {
451
+		if (in_array($app, ['settings', 'files'])) {
452 452
 			$this->appManager
453 453
 				->method('getAppPath')
454 454
 				->with($app)
455
-				->willReturn(\OC::$SERVERROOT . '/apps/' . $app);
455
+				->willReturn(\OC::$SERVERROOT.'/apps/'.$app);
456 456
 		} else {
457 457
 			$this->appManager
458 458
 				->method('getAppPath')
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 
492 492
 		$this->config->expects(self::any())
493 493
 			->method('getSystemValue')
494
-			->willReturnCallback(function ($var, $default) use ($defaultLang) {
494
+			->willReturnCallback(function($var, $default) use ($defaultLang) {
495 495
 				if ($var === 'default_language') {
496 496
 					return $defaultLang;
497 497
 				} else {
@@ -527,16 +527,16 @@  discard block
 block discarded – undo
527 527
 		$factory = $this->getFactory(['languageExists', 'findAvailableLanguages', 'respectDefaultLanguage']);
528 528
 		$factory->expects(self::any())
529 529
 			->method('languageExists')
530
-			->willReturnCallback(function ($app, $lang) use ($availableLang) {
530
+			->willReturnCallback(function($app, $lang) use ($availableLang) {
531 531
 				return in_array($lang, $availableLang);
532 532
 			});
533 533
 		$factory->expects(self::any())
534 534
 			->method('findAvailableLanguages')
535
-			->willReturnCallback(function ($app) use ($availableLang) {
535
+			->willReturnCallback(function($app) use ($availableLang) {
536 536
 				return $availableLang;
537 537
 			});
538 538
 		$factory->expects(self::any())
539
-			->method('respectDefaultLanguage')->willReturnCallback(function ($app, $lang) {
539
+			->method('respectDefaultLanguage')->willReturnCallback(function($app, $lang) {
540 540
 				return $lang;
541 541
 			});
542 542
 
@@ -562,8 +562,8 @@  discard block
 block discarded – undo
562 562
 		$this->config->expects(self::exactly(2))
563 563
 			->method('getSystemValue')
564 564
 			->willReturnMap([
565
-				['force_language', false, false,],
566
-				['default_language', false, 'cz',],
565
+				['force_language', false, false, ],
566
+				['default_language', false, 'cz', ],
567 567
 			]);
568 568
 		$factory->expects(self::once())
569 569
 			->method('languageExists')
@@ -580,8 +580,8 @@  discard block
 block discarded – undo
580 580
 		$this->config->expects(self::exactly(2))
581 581
 			->method('getSystemValue')
582 582
 			->willReturnMap([
583
-				['force_language', false, false,],
584
-				['default_language', false, false,],
583
+				['force_language', false, false, ],
584
+				['default_language', false, false, ],
585 585
 			]);
586 586
 		$user = $this->createMock(IUser::class);
587 587
 		$this->userSession->expects(self::once())
@@ -602,8 +602,8 @@  discard block
 block discarded – undo
602 602
 		$factory = $this->getFactory(['findAvailableLanguages', 'languageExists']);
603 603
 		$this->config->method('getSystemValue')
604 604
 			->willReturnMap([
605
-				['force_language', false, false,],
606
-				['default_language', false, false,],
605
+				['force_language', false, false, ],
606
+				['default_language', false, false, ],
607 607
 			]);
608 608
 		$user = $this->createMock(IUser::class);
609 609
 		$this->userSession->expects(self::once())
@@ -632,8 +632,8 @@  discard block
 block discarded – undo
632 632
 		$factory = $this->getFactory(['findAvailableLanguages', 'languageExists']);
633 633
 		$this->config->method('getSystemValue')
634 634
 			->willReturnMap([
635
-				['force_language', false, false,],
636
-				['default_language', false, false,],
635
+				['force_language', false, false, ],
636
+				['default_language', false, false, ],
637 637
 			]);
638 638
 		$user = $this->createMock(IUser::class);
639 639
 		$this->userSession->expects(self::once())
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
 			->method('languageExists')->willReturn(true);
716 716
 		$factory->expects(self::any())
717 717
 			->method('findAvailableLanguages')
718
-			->willReturnCallback(function ($app) use ($availableLanguages) {
718
+			->willReturnCallback(function($app) use ($availableLanguages) {
719 719
 				return $availableLanguages;
720 720
 			});
721 721
 
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 			]);
729 729
 
730 730
 		$result = $this->invokePrivate($factory, 'getLanguages');
731
-		$commonLanguagesCodes = array_map(function ($lang) {
731
+		$commonLanguagesCodes = array_map(function($lang) {
732 732
 			return $lang['code'];
733 733
 		}, $result['commonLanguages']);
734 734
 
@@ -737,9 +737,9 @@  discard block
 block discarded – undo
737 737
 
738 738
 	public static function languageIteratorRequestProvider(): array {
739 739
 		return [
740
-			[ true, true],
741
-			[ false, true],
742
-			[ false, false],
740
+			[true, true],
741
+			[false, true],
742
+			[false, false],
743 743
 		];
744 744
 	}
745 745
 
Please login to merge, or discard this patch.
tests/lib/L10N/L10nTest.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -43,30 +43,30 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 
45 45
 	public function testSimpleTranslationWithTrailingColon(): void {
46
-		$transFile = \OC::$SERVERROOT . '/tests/data/l10n/de.json';
46
+		$transFile = \OC::$SERVERROOT.'/tests/data/l10n/de.json';
47 47
 		$l = new L10N($this->getFactory(), 'test', 'de', 'de_AT', [$transFile]);
48 48
 
49 49
 		$this->assertEquals('Files:', $l->t('Files:'));
50 50
 	}
51 51
 
52 52
 	public function testGermanPluralTranslations(): void {
53
-		$transFile = \OC::$SERVERROOT . '/tests/data/l10n/de.json';
53
+		$transFile = \OC::$SERVERROOT.'/tests/data/l10n/de.json';
54 54
 		$l = new L10N($this->getFactory(), 'test', 'de', 'de_AT', [$transFile]);
55 55
 
56
-		$this->assertEquals('1 Datei', (string)$l->n('%n file', '%n files', 1));
57
-		$this->assertEquals('2 Dateien', (string)$l->n('%n file', '%n files', 2));
56
+		$this->assertEquals('1 Datei', (string) $l->n('%n file', '%n files', 1));
57
+		$this->assertEquals('2 Dateien', (string) $l->n('%n file', '%n files', 2));
58 58
 	}
59 59
 
60 60
 	public function testRussianPluralTranslations(): void {
61
-		$transFile = \OC::$SERVERROOT . '/tests/data/l10n/ru.json';
61
+		$transFile = \OC::$SERVERROOT.'/tests/data/l10n/ru.json';
62 62
 		$l = new L10N($this->getFactory(), 'test', 'ru', 'ru_UA', [$transFile]);
63 63
 
64
-		$this->assertEquals('1 файл', (string)$l->n('%n file', '%n files', 1));
65
-		$this->assertEquals('2 файла', (string)$l->n('%n file', '%n files', 2));
66
-		$this->assertEquals('6 файлов', (string)$l->n('%n file', '%n files', 6));
67
-		$this->assertEquals('21 файл', (string)$l->n('%n file', '%n files', 21));
68
-		$this->assertEquals('22 файла', (string)$l->n('%n file', '%n files', 22));
69
-		$this->assertEquals('26 файлов', (string)$l->n('%n file', '%n files', 26));
64
+		$this->assertEquals('1 файл', (string) $l->n('%n file', '%n files', 1));
65
+		$this->assertEquals('2 файла', (string) $l->n('%n file', '%n files', 2));
66
+		$this->assertEquals('6 файлов', (string) $l->n('%n file', '%n files', 6));
67
+		$this->assertEquals('21 файл', (string) $l->n('%n file', '%n files', 21));
68
+		$this->assertEquals('22 файла', (string) $l->n('%n file', '%n files', 22));
69
+		$this->assertEquals('26 файлов', (string) $l->n('%n file', '%n files', 26));
70 70
 
71 71
 		/*
72 72
 		  1 file	1 файл	1 папка
@@ -82,21 +82,21 @@  discard block
 block discarded – undo
82 82
 	}
83 83
 
84 84
 	public function testCzechPluralTranslations(): void {
85
-		$transFile = \OC::$SERVERROOT . '/tests/data/l10n/cs.json';
85
+		$transFile = \OC::$SERVERROOT.'/tests/data/l10n/cs.json';
86 86
 		$l = new L10N($this->getFactory(), 'test', 'cs', 'cs_CZ', [$transFile]);
87 87
 
88
-		$this->assertEquals('1 okno', (string)$l->n('%n window', '%n windows', 1));
89
-		$this->assertEquals('2 okna', (string)$l->n('%n window', '%n windows', 2));
90
-		$this->assertEquals('5 oken', (string)$l->n('%n window', '%n windows', 5));
88
+		$this->assertEquals('1 okno', (string) $l->n('%n window', '%n windows', 1));
89
+		$this->assertEquals('2 okna', (string) $l->n('%n window', '%n windows', 2));
90
+		$this->assertEquals('5 oken', (string) $l->n('%n window', '%n windows', 5));
91 91
 	}
92 92
 
93 93
 	public function testGermanPluralWithCzechLocaleTranslations(): void {
94
-		$transFile = \OC::$SERVERROOT . '/tests/data/l10n/de.json';
94
+		$transFile = \OC::$SERVERROOT.'/tests/data/l10n/de.json';
95 95
 		$l = new L10N($this->getFactory(), 'test', 'de', 'cs_CZ', [$transFile]);
96 96
 
97
-		$this->assertEquals('1 Datei', (string)$l->n('%n file', '%n files', 1));
98
-		$this->assertEquals('2 Dateien', (string)$l->n('%n file', '%n files', 2));
99
-		$this->assertEquals('5 Dateien', (string)$l->n('%n file', '%n files', 5));
97
+		$this->assertEquals('1 Datei', (string) $l->n('%n file', '%n files', 1));
98
+		$this->assertEquals('2 Dateien', (string) $l->n('%n file', '%n files', 2));
99
+		$this->assertEquals('5 Dateien', (string) $l->n('%n file', '%n files', 5));
100 100
 	}
101 101
 
102 102
 	public static function dataPlaceholders(): array {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	#[\PHPUnit\Framework\Attributes\DataProvider('dataPlaceholders')]
116 116
 	public function testPlaceholders($string, $expected): void {
117
-		$transFile = \OC::$SERVERROOT . '/tests/data/l10n/de.json';
117
+		$transFile = \OC::$SERVERROOT.'/tests/data/l10n/de.json';
118 118
 		$l = new L10N($this->getFactory(), 'test', 'de', 'de_AT', [$transFile]);
119 119
 
120 120
 		$this->assertEquals($expected, $l->t($string, ['1', '2']));
Please login to merge, or discard this patch.
tests/lib/Comments/ManagerTest.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 			])
137 137
 			->executeStatement();
138 138
 
139
-		$id = (string)$qb->getLastInsertId();
139
+		$id = (string) $qb->getLastInsertId();
140 140
 
141 141
 		$comment = $manager->get($id);
142 142
 		$this->assertInstanceOf(IComment::class, $comment);
@@ -185,14 +185,14 @@  discard block
 block discarded – undo
185 185
 		// Verifying the root comment
186 186
 		$this->assertArrayHasKey('comment', $tree);
187 187
 		$this->assertInstanceOf(IComment::class, $tree['comment']);
188
-		$this->assertSame((string)$headId, $tree['comment']->getId());
188
+		$this->assertSame((string) $headId, $tree['comment']->getId());
189 189
 		$this->assertArrayHasKey('replies', $tree);
190 190
 		$this->assertCount(3, $tree['replies']);
191 191
 
192 192
 		// one level deep
193 193
 		foreach ($tree['replies'] as $reply) {
194 194
 			$this->assertInstanceOf(IComment::class, $reply['comment']);
195
-			$this->assertSame((string)$id, $reply['comment']->getId());
195
+			$this->assertSame((string) $id, $reply['comment']->getId());
196 196
 			$this->assertCount(0, $reply['replies']);
197 197
 			$id--;
198 198
 		}
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		// Verifying the root comment
208 208
 		$this->assertArrayHasKey('comment', $tree);
209 209
 		$this->assertInstanceOf(IComment::class, $tree['comment']);
210
-		$this->assertSame((string)$id, $tree['comment']->getId());
210
+		$this->assertSame((string) $id, $tree['comment']->getId());
211 211
 		$this->assertArrayHasKey('replies', $tree);
212 212
 		$this->assertCount(0, $tree['replies']);
213 213
 	}
@@ -223,19 +223,19 @@  discard block
 block discarded – undo
223 223
 		$manager = $this->getManager();
224 224
 
225 225
 		for ($offset = 0; $offset < 3; $offset += 2) {
226
-			$tree = $manager->getTree((string)$headId, 2, $offset);
226
+			$tree = $manager->getTree((string) $headId, 2, $offset);
227 227
 
228 228
 			// Verifying the root comment
229 229
 			$this->assertArrayHasKey('comment', $tree);
230 230
 			$this->assertInstanceOf(IComment::class, $tree['comment']);
231
-			$this->assertSame((string)$headId, $tree['comment']->getId());
231
+			$this->assertSame((string) $headId, $tree['comment']->getId());
232 232
 			$this->assertArrayHasKey('replies', $tree);
233 233
 			$this->assertCount(2, $tree['replies']);
234 234
 
235 235
 			// one level deep
236 236
 			foreach ($tree['replies'] as $reply) {
237 237
 				$this->assertInstanceOf(IComment::class, $reply['comment']);
238
-				$this->assertSame((string)$idToVerify, $reply['comment']->getId());
238
+				$this->assertSame((string) $idToVerify, $reply['comment']->getId());
239 239
 				$this->assertCount(0, $reply['replies']);
240 240
 				$idToVerify--;
241 241
 			}
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 			foreach ($comments as $key => $comment) {
273 273
 				$this->assertInstanceOf(IComment::class, $comment);
274 274
 				$this->assertSame('nice one', $comment->getMessage());
275
-				$this->assertSame((string)$idToVerify, $comment->getId(), 'ID wrong for comment ' . $key . ' on offset: ' . $offset);
275
+				$this->assertSame((string) $idToVerify, $comment->getId(), 'ID wrong for comment '.$key.' on offset: '.$offset);
276 276
 				$idToVerify--;
277 277
 			}
278 278
 			$offset += 3;
@@ -289,8 +289,8 @@  discard block
 block discarded – undo
289 289
 		$comments = $manager->getForObject('files', 'file64', 0, 0, new \DateTime('-4 hours'));
290 290
 
291 291
 		$this->assertCount(2, $comments);
292
-		$this->assertSame((string)$id2, $comments[0]->getId());
293
-		$this->assertSame((string)$id1, $comments[1]->getId());
292
+		$this->assertSame((string) $id2, $comments[0]->getId());
293
+		$this->assertSame((string) $id1, $comments[1]->getId());
294 294
 	}
295 295
 
296 296
 	public function testGetForObjectWithLimitAndOffsetAndDateTimeConstraint(): void {
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 			foreach ($comments as $comment) {
312 312
 				$this->assertInstanceOf(IComment::class, $comment);
313 313
 				$this->assertSame('nice one', $comment->getMessage());
314
-				$this->assertSame((string)$idToVerify, $comment->getId());
314
+				$this->assertSame((string) $idToVerify, $comment->getId());
315 315
 				$this->assertGreaterThanOrEqual(4, $comment->getId());
316 316
 				$idToVerify--;
317 317
 			}
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 	public function testGetNumberOfUnreadCommentsForFolder(): void {
337 337
 		$folder = $this->createMock(Folder::class);
338 338
 		$fileIds = range(1111, 1114);
339
-		$children = array_map(function (int $id) {
339
+		$children = array_map(function(int $id) {
340 340
 			$file = $this->createMock(Folder::class);
341 341
 			$file->method('getId')
342 342
 				->willReturn($id);
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
 
366 366
 		$manager = $this->getManager();
367 367
 
368
-		$manager->setReadMark('files', (string)$fileIds[0], (new \DateTime())->modify('-1 days'), $user);
369
-		$manager->setReadMark('files', (string)$fileIds[2], (new \DateTime()), $user);
368
+		$manager->setReadMark('files', (string) $fileIds[0], (new \DateTime())->modify('-1 days'), $user);
369
+		$manager->setReadMark('files', (string) $fileIds[2], (new \DateTime()), $user);
370 370
 
371 371
 		$amount = $manager->getNumberOfUnreadCommentsForFolder($folder->getId(), $user);
372 372
 		$this->assertEquals([
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 			$expected = array_reverse($expected);
394 394
 		}
395 395
 
396
-		$this->assertSame($expected, array_map(static fn (IComment $c): int => (int)$c->getId(), $comments));
396
+		$this->assertSame($expected, array_map(static fn (IComment $c): int => (int) $c->getId(), $comments));
397 397
 	}
398 398
 
399 399
 	public static function dataGetForObjectSince(): array {
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 	}
424 424
 
425 425
 	#[\PHPUnit\Framework\Attributes\DataProvider('invalidCreateArgsProvider')]
426
-	public function testCreateCommentInvalidArguments(string|int $aType, string|int $aId, string|int $oType, string|int $oId): void {
426
+	public function testCreateCommentInvalidArguments(string | int $aType, string | int $aId, string | int $oType, string | int $oId): void {
427 427
 		$this->expectException(\InvalidArgumentException::class);
428 428
 
429 429
 		$manager = $this->getManager();
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 		$done = $manager->delete('');
460 460
 		$this->assertFalse($done);
461 461
 
462
-		$id = (string)$this->addDatabaseEntry(0, 0);
462
+		$id = (string) $this->addDatabaseEntry(0, 0);
463 463
 		$comment = $manager->get($id);
464 464
 		$this->assertInstanceOf(IComment::class, $comment);
465 465
 		$done = $manager->delete($id);
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 	}
575 575
 
576 576
 	public function testSaveAsChild(): void {
577
-		$id = (string)$this->addDatabaseEntry(0, 0);
577
+		$id = (string) $this->addDatabaseEntry(0, 0);
578 578
 
579 579
 		$manager = $this->getManager();
580 580
 
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 				->setMessage('full ack')
588 588
 				->setVerb('comment')
589 589
 				// setting the creation time avoids using sleep() while making sure to test with different timestamps
590
-				->setCreationDateTime(new \DateTime('+' . $i . ' minutes'));
590
+				->setCreationDateTime(new \DateTime('+'.$i.' minutes'));
591 591
 
592 592
 			$manager->save($comment);
593 593
 
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 	}
609 609
 
610 610
 	#[\PHPUnit\Framework\Attributes\DataProvider('invalidActorArgsProvider')]
611
-	public function testDeleteReferencesOfActorInvalidInput(string|int $type, string|int $id): void {
611
+	public function testDeleteReferencesOfActorInvalidInput(string | int $type, string | int $id): void {
612 612
 		$this->expectException(\InvalidArgumentException::class);
613 613
 
614 614
 		$manager = $this->getManager();
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 		$manager = $this->getManager();
625 625
 
626 626
 		// just to make sure they are really set, with correct actor data
627
-		$comment = $manager->get((string)$ids[1]);
627
+		$comment = $manager->get((string) $ids[1]);
628 628
 		$this->assertSame('users', $comment->getActorType());
629 629
 		$this->assertSame('alice', $comment->getActorId());
630 630
 
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 		$this->assertTrue($wasSuccessful);
633 633
 
634 634
 		foreach ($ids as $id) {
635
-			$comment = $manager->get((string)$id);
635
+			$comment = $manager->get((string) $id);
636 636
 			$this->assertSame(ICommentsManager::DELETED_USER, $comment->getActorType());
637 637
 			$this->assertSame(ICommentsManager::DELETED_USER, $comment->getActorId());
638 638
 		}
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 	}
674 674
 
675 675
 	#[\PHPUnit\Framework\Attributes\DataProvider('invalidObjectArgsProvider')]
676
-	public function testDeleteCommentsAtObjectInvalidInput(string|int $type, string|int $id): void {
676
+	public function testDeleteCommentsAtObjectInvalidInput(string | int $type, string | int $id): void {
677 677
 		$this->expectException(\InvalidArgumentException::class);
678 678
 
679 679
 		$manager = $this->getManager();
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
 		$manager = $this->getManager();
690 690
 
691 691
 		// just to make sure they are really set, with correct actor data
692
-		$comment = $manager->get((string)$ids[1]);
692
+		$comment = $manager->get((string) $ids[1]);
693 693
 		$this->assertSame('files', $comment->getObjectType());
694 694
 		$this->assertSame('file64', $comment->getObjectId());
695 695
 
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 		$verified = 0;
700 700
 		foreach ($ids as $id) {
701 701
 			try {
702
-				$manager->get((string)$id);
702
+				$manager->get((string) $id);
703 703
 			} catch (NotFoundException) {
704 704
 				$verified++;
705 705
 			}
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
 		);
734 734
 
735 735
 		// just to make sure they are really set, with correct actor data
736
-		$comment = $manager->get((string)$ids[1]);
736
+		$comment = $manager->get((string) $ids[1]);
737 737
 		$this->assertSame('files', $comment->getObjectType());
738 738
 		$this->assertSame('file64', $comment->getObjectId());
739 739
 
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
 		$exists = 0;
745 745
 		foreach ($ids as $id) {
746 746
 			try {
747
-				$manager->get((string)$id);
747
+				$manager->get((string) $id);
748 748
 				$exists++;
749 749
 			} catch (NotFoundException) {
750 750
 				$deleted++;
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 		$exists = 0;
787 787
 		foreach ($ids as $id) {
788 788
 			try {
789
-				$manager->get((string)$id);
789
+				$manager->get((string) $id);
790 790
 				$exists++;
791 791
 			} catch (NotFoundException) {
792 792
 				$deleted++;
@@ -884,10 +884,10 @@  discard block
 block discarded – undo
884 884
 			->method('handle');
885 885
 
886 886
 		$manager = $this->getManager();
887
-		$manager->registerEventHandler(function () use ($handler1) {
887
+		$manager->registerEventHandler(function() use ($handler1) {
888 888
 			return $handler1;
889 889
 		});
890
-		$manager->registerEventHandler(function () use ($handler2) {
890
+		$manager->registerEventHandler(function() use ($handler2) {
891 891
 			return $handler2;
892 892
 		});
893 893
 
@@ -912,11 +912,11 @@  discard block
 block discarded – undo
912 912
 	public function testResolveDisplayName(): void {
913 913
 		$manager = $this->getManager();
914 914
 
915
-		$planetClosure = function ($name) {
915
+		$planetClosure = function($name) {
916 916
 			return ucfirst($name);
917 917
 		};
918 918
 
919
-		$galaxyClosure = function ($name) {
919
+		$galaxyClosure = function($name) {
920 920
 			return strtoupper($name);
921 921
 		};
922 922
 
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
 
934 934
 		$manager = $this->getManager();
935 935
 
936
-		$planetClosure = function ($name) {
936
+		$planetClosure = function($name) {
937 937
 			return ucfirst($name);
938 938
 		};
939 939
 		$manager->registerDisplayNameResolver('planet', $planetClosure);
@@ -946,7 +946,7 @@  discard block
 block discarded – undo
946 946
 
947 947
 		$manager = $this->getManager();
948 948
 
949
-		$planetClosure = function ($name) {
949
+		$planetClosure = function($name) {
950 950
 			return ucfirst($name);
951 951
 		};
952 952
 		$manager->registerDisplayNameResolver(1337, $planetClosure);
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
 
959 959
 		$manager = $this->getManager();
960 960
 
961
-		$planetClosure = function ($name) {
961
+		$planetClosure = function($name) {
962 962
 			return ucfirst($name);
963 963
 		};
964 964
 
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
 	public function testResolveDisplayNameDirtyResolver(): void {
970 970
 		$manager = $this->getManager();
971 971
 
972
-		$planetClosure = function () {
972
+		$planetClosure = function() {
973 973
 			return null;
974 974
 		};
975 975
 
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
 
982 982
 		$manager = $this->getManager();
983 983
 
984
-		$planetClosure = function () {
984
+		$planetClosure = function() {
985 985
 			return null;
986 986
 		};
987 987
 
@@ -1068,14 +1068,14 @@  discard block
 block discarded – undo
1068 1068
 			[$message, $actorId, $verb, $parentText] = $comment;
1069 1069
 			$parentId = null;
1070 1070
 			if ($parentText) {
1071
-				$parentId = (string)$comments[$parentText]->getId();
1071
+				$parentId = (string) $comments[$parentText]->getId();
1072 1072
 			}
1073 1073
 			$id = '';
1074 1074
 			if ($verb === 'reaction_deleted') {
1075
-				$id = $comments[$message . '#' . $actorId]->getId();
1075
+				$id = $comments[$message.'#'.$actorId]->getId();
1076 1076
 			}
1077 1077
 			$comment = $this->testSave($message, $actorId, $verb, $parentId, $id);
1078
-			$comments[$comment->getMessage() . '#' . $comment->getActorId()] = $comment;
1078
+			$comments[$comment->getMessage().'#'.$comment->getActorId()] = $comment;
1079 1079
 		}
1080 1080
 		$this->connection->commit();
1081 1081
 		return $comments;
@@ -1088,8 +1088,8 @@  discard block
 block discarded – undo
1088 1088
 
1089 1089
 		$processedComments = $this->proccessComments($comments);
1090 1090
 		$comment = reset($processedComments);
1091
-		$all = $manager->retrieveAllReactions((int)$comment->getId());
1092
-		$actual = array_map(static function (IComment $row): array {
1091
+		$all = $manager->retrieveAllReactions((int) $comment->getId());
1092
+		$actual = array_map(static function(IComment $row): array {
1093 1093
 			return [
1094 1094
 				$row->getActorId(),
1095 1095
 				$row->getMessage(),
@@ -2350,8 +2350,8 @@  discard block
 block discarded – undo
2350 2350
 
2351 2351
 		$processedComments = $this->proccessComments($comments);
2352 2352
 		$comment = reset($processedComments);
2353
-		$all = $manager->retrieveAllReactionsWithSpecificReaction((int)$comment->getId(), $reaction);
2354
-		$actual = array_map(static function (IComment $row): array {
2353
+		$all = $manager->retrieveAllReactionsWithSpecificReaction((int) $comment->getId(), $reaction);
2354
+		$actual = array_map(static function(IComment $row): array {
2355 2355
 			return [
2356 2356
 				$row->getActorId(),
2357 2357
 				$row->getMessage(),
@@ -2409,8 +2409,8 @@  discard block
 block discarded – undo
2409 2409
 		if ($notFound) {
2410 2410
 			$this->expectException(NotFoundException::class);
2411 2411
 		}
2412
-		$comment = $processedComments[$expected['message'] . '#' . $expected['actorId']];
2413
-		$actual = $manager->getReactionComment((int)$comment->getParentId(), $comment->getActorType(), $comment->getActorId(), $comment->getMessage());
2412
+		$comment = $processedComments[$expected['message'].'#'.$expected['actorId']];
2413
+		$actual = $manager->getReactionComment((int) $comment->getParentId(), $comment->getActorType(), $comment->getActorId(), $comment->getMessage());
2414 2414
 		if (!$notFound) {
2415 2415
 			$this->assertEquals($expected['message'], $actual->getMessage());
2416 2416
 			$this->assertEquals($expected['actorId'], $actual->getActorId());
Please login to merge, or discard this patch.
tests/lib/NavigationManagerTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	/** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
40 40
 	protected $config;
41 41
 
42
-	protected IEVentDispatcher|MockObject $dispatcher;
42
+	protected IEVentDispatcher | MockObject $dispatcher;
43 43
 
44 44
 	/** @var NavigationManager */
45 45
 	protected $navigationManager;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 		global $testAddClosureNumberOfCalls;
150 150
 		$testAddClosureNumberOfCalls = 0;
151 151
 
152
-		$this->navigationManager->add(function () use ($entry) {
152
+		$this->navigationManager->add(function() use ($entry) {
153 153
 			global $testAddClosureNumberOfCalls;
154 154
 			$testAddClosureNumberOfCalls++;
155 155
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 		global $testAddClosureNumberOfCalls;
202 202
 		$testAddClosureNumberOfCalls = 0;
203 203
 
204
-		$this->navigationManager->add(function () use ($entry) {
204
+		$this->navigationManager->add(function() use ($entry) {
205 205
 			global $testAddClosureNumberOfCalls;
206 206
 			$testAddClosureNumberOfCalls++;
207 207
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	#[\PHPUnit\Framework\Attributes\DataProvider('providesNavigationConfig')]
219 219
 	public function testWithAppManager($expected, $navigation, $isAdmin = false): void {
220 220
 		$l = $this->createMock(IL10N::class);
221
-		$l->expects($this->any())->method('t')->willReturnCallback(function ($text, $parameters = []) {
221
+		$l->expects($this->any())->method('t')->willReturnCallback(function($text, $parameters = []) {
222 222
 			return vsprintf($text, $parameters);
223 223
 		});
224 224
 
@@ -236,14 +236,14 @@  discard block
 block discarded – undo
236 236
 			->willReturn($navigation);
237 237
 		$this->urlGenerator->expects($this->any())
238 238
 			->method('imagePath')
239
-			->willReturnCallback(function ($appName, $file) {
239
+			->willReturnCallback(function($appName, $file) {
240 240
 				return "/apps/$appName/img/$file";
241 241
 			});
242 242
 		$this->appManager->expects($this->any())
243 243
 			->method('getAppIcon')
244 244
 			->willReturnCallback(fn (string $appName) => "/apps/$appName/img/app.svg");
245 245
 		$this->l10nFac->expects($this->any())->method('get')->willReturn($l);
246
-		$this->urlGenerator->expects($this->any())->method('linkToRoute')->willReturnCallback(function ($route) {
246
+		$this->urlGenerator->expects($this->any())->method('linkToRoute')->willReturnCallback(function($route) {
247 247
 			if ($route === 'core.login.logout') {
248 248
 				return 'https://example.com/logout';
249 249
 			}
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 		$this->navigationManager->clear();
266 266
 		$this->dispatcher->expects($this->once())
267 267
 			->method('dispatchTyped')
268
-			->willReturnCallback(function ($event): void {
268
+			->willReturnCallback(function($event): void {
269 269
 				$this->assertInstanceOf(LoadAdditionalEntriesEvent::class, $event);
270 270
 			});
271 271
 		$entries = $this->navigationManager->getAll('all');
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 			'logout' => [
324 324
 				'id' => 'logout',
325 325
 				'order' => 99999,
326
-				'href' => 'https://example.com/logout?requesttoken=' . urlencode(Util::callRegister()),
326
+				'href' => 'https://example.com/logout?requesttoken='.urlencode(Util::callRegister()),
327 327
 				'icon' => '/apps/core/img/actions/logout.svg',
328 328
 				'name' => 'Log out',
329 329
 				'active' => false,
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 
504 504
 	public function testWithAppManagerAndApporder(): void {
505 505
 		$l = $this->createMock(IL10N::class);
506
-		$l->expects($this->any())->method('t')->willReturnCallback(function ($text, $parameters = []) {
506
+		$l->expects($this->any())->method('t')->willReturnCallback(function($text, $parameters = []) {
507 507
 			return vsprintf($text, $parameters);
508 508
 		});
509 509
 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 
532 532
 		$this->config->method('getUserValue')
533 533
 			->willReturnCallback(
534
-				function (string $userId, string $appName, string $key, mixed $default = '') use ($testOrder) {
534
+				function(string $userId, string $appName, string $key, mixed $default = '') use ($testOrder) {
535 535
 					$this->assertEquals('user001', $userId);
536 536
 					if ($key === 'apporder') {
537 537
 						return json_encode(['test' => ['app' => 'test', 'order' => $testOrder]]);
@@ -547,10 +547,10 @@  discard block
 block discarded – undo
547 547
 		$this->appManager->expects($this->once())->method('getAppInfo')->with('test')->willReturn($navigation);
548 548
 		$this->appManager->expects($this->once())->method('getAppIcon')->with('test')->willReturn('/apps/test/img/app.svg');
549 549
 		$this->l10nFac->expects($this->any())->method('get')->willReturn($l);
550
-		$this->urlGenerator->expects($this->any())->method('imagePath')->willReturnCallback(function ($appName, $file) {
550
+		$this->urlGenerator->expects($this->any())->method('imagePath')->willReturnCallback(function($appName, $file) {
551 551
 			return "/apps/$appName/img/$file";
552 552
 		});
553
-		$this->urlGenerator->expects($this->any())->method('linkToRoute')->willReturnCallback(function ($route) {
553
+		$this->urlGenerator->expects($this->any())->method('linkToRoute')->willReturnCallback(function($route) {
554 554
 			if ($route === 'core.login.logout') {
555 555
 				return 'https://example.com/logout';
556 556
 			}
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 		$this->navigationManager->clear();
573 573
 		$this->dispatcher->expects($this->once())
574 574
 			->method('dispatchTyped')
575
-			->willReturnCallback(function ($event): void {
575
+			->willReturnCallback(function($event): void {
576 576
 				$this->assertInstanceOf(LoadAdditionalEntriesEvent::class, $event);
577 577
 			});
578 578
 		$entries = $this->navigationManager->getAll();
@@ -737,13 +737,13 @@  discard block
 block discarded – undo
737 737
 		$this->navigationManager->add([
738 738
 			'id' => 'settings',
739 739
 		]);
740
-		$this->navigationManager->add(static function (): array {
740
+		$this->navigationManager->add(static function(): array {
741 741
 			return [
742 742
 				'id' => 'closure1',
743 743
 				'href' => '/closure1',
744 744
 			];
745 745
 		});
746
-		$this->navigationManager->add(static function (): array {
746
+		$this->navigationManager->add(static function(): array {
747 747
 			return [
748 748
 				'id' => 'closure2',
749 749
 				'href' => '/closure2',
Please login to merge, or discard this patch.
tests/lib/Security/SecureRandomTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,9 +62,9 @@
 block discarded – undo
62 62
 	#[\PHPUnit\Framework\Attributes\DataProvider('charCombinations')]
63 63
 	public function testScheme($charName, $chars): void {
64 64
 		$generator = $this->rng;
65
-		$scheme = constant('OCP\Security\ISecureRandom::' . $charName);
65
+		$scheme = constant('OCP\Security\ISecureRandom::'.$charName);
66 66
 		$randomString = $generator->generate(100, $scheme);
67
-		$matchesRegex = preg_match('/^' . $chars . '+$/', $randomString);
67
+		$matchesRegex = preg_match('/^'.$chars.'+$/', $randomString);
68 68
 		$this->assertSame(1, $matchesRegex);
69 69
 	}
70 70
 
Please login to merge, or discard this patch.
tests/lib/Security/CertificateManagerTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$this->createUser($this->username, '');
44 44
 
45 45
 		$storage = new Temporary();
46
-		$this->registerMount($this->username, $storage, '/' . $this->username . '/');
46
+		$this->registerMount($this->username, $storage, '/'.$this->username.'/');
47 47
 
48 48
 		\OC_Util::tearDownFS();
49 49
 		\OC_User::setUserId($this->username);
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 		$this->assertSame([], $this->certificateManager->listCertificates());
87 87
 
88 88
 		// Add some certificates
89
-		$this->certificateManager->addCertificate(file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
89
+		$this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
90 90
 		$certificateStore = [];
91
-		$certificateStore[] = new Certificate(file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
91
+		$certificateStore[] = new Certificate(file_get_contents(__DIR__.'/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
92 92
 		$this->assertEqualsArrays($certificateStore, $this->certificateManager->listCertificates());
93 93
 
94 94
 		// Add another certificates
95
-		$this->certificateManager->addCertificate(file_get_contents(__DIR__ . '/../../data/certificates/expiredCertificate.crt'), 'ExpiredCertificate');
96
-		$certificateStore[] = new Certificate(file_get_contents(__DIR__ . '/../../data/certificates/expiredCertificate.crt'), 'ExpiredCertificate');
95
+		$this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), 'ExpiredCertificate');
96
+		$certificateStore[] = new Certificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), 'ExpiredCertificate');
97 97
 		$this->assertEqualsArrays($certificateStore, $this->certificateManager->listCertificates());
98 98
 	}
99 99
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	#[\PHPUnit\Framework\Attributes\DataProvider('dangerousFileProvider')]
120 120
 	public function testAddDangerousFile($filename): void {
121 121
 		$this->expectException(InvalidPathException::class);
122
-		$this->certificateManager->addCertificate(file_get_contents(__DIR__ . '/../../data/certificates/expiredCertificate.crt'), $filename);
122
+		$this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), $filename);
123 123
 	}
124 124
 
125 125
 	public function testRemoveDangerousFile(): void {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	}
128 128
 
129 129
 	public function testRemoveExistingFile(): void {
130
-		$this->certificateManager->addCertificate(file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
130
+		$this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
131 131
 		$this->assertTrue($this->certificateManager->removeCertificate('GoodCertificate'));
132 132
 	}
133 133
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
 
172 172
 		$view->expects($this->any())->method('filemtime')
173
-			->willReturnCallback(function ($path) use ($targetBundleMtime) {
173
+			->willReturnCallback(function($path) use ($targetBundleMtime) {
174 174
 				if ($path === 'targetBundlePath') {
175 175
 					return $targetBundleMtime;
176 176
 				}
Please login to merge, or discard this patch.
tests/lib/LoggerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 		if (is_array($message)) {
178 178
 			$textMessage = $message['message'];
179 179
 		}
180
-		$this->logs[] = $level . ' ' . $textMessage;
180
+		$this->logs[] = $level.' '.$textMessage;
181 181
 	}
182 182
 
183 183
 	public static function userAndPasswordData(): array {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	#[\PHPUnit\Framework\Attributes\DataProvider('userAndPasswordData')]
281 281
 	public function testDetectclosure(string $user, string $password): void {
282 282
 		$this->mockDefaultLogLevel();
283
-		$a = function ($user, $password): void {
283
+		$a = function($user, $password): void {
284 284
 			throw new \Exception('test');
285 285
 		};
286 286
 		$this->registry->expects($this->once())
Please login to merge, or discard this patch.