Completed
Push — master ( 49a025...016f2f )
by
unknown
60:07 queued 24:26
created
tests/lib/Calendar/Room/ManagerTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 		$this->server->expects(self::exactly(2))
55 55
 			->method('query')
56 56
 			->willReturnMap([
57
-				['calendar_room_backend1', true, $backend1,],
58
-				['calendar_room_backend2', true, $backend2,],
57
+				['calendar_room_backend1', true, $backend1, ],
58
+				['calendar_room_backend2', true, $backend2, ],
59 59
 			]);
60 60
 
61 61
 		$this->manager->registerBackend('calendar_room_backend1');
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 		$this->server->expects(self::exactly(2))
102 102
 			->method('query')
103 103
 			->willReturnMap([
104
-				['calendar_room_backend1', true, $backend1,],
105
-				['calendar_room_backend2', true, $backend2,],
104
+				['calendar_room_backend1', true, $backend1, ],
105
+				['calendar_room_backend2', true, $backend2, ],
106 106
 			]);
107 107
 
108 108
 		$this->manager->registerBackend('calendar_room_backend1');
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 		$this->server->expects(self::exactly(2))
121 121
 			->method('query')
122 122
 			->willReturnMap([
123
-				['calendar_room_backend1', true, $backend1,],
124
-				['calendar_room_backend2', true, $backend2,],
123
+				['calendar_room_backend1', true, $backend1, ],
124
+				['calendar_room_backend2', true, $backend2, ],
125 125
 			]);
126 126
 
127 127
 		$this->manager->registerBackend('calendar_room_backend1');
Please login to merge, or discard this patch.
tests/lib/Calendar/Resource/ManagerTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 		$this->server->expects(self::exactly(2))
55 55
 			->method('query')
56 56
 			->willReturnMap([
57
-				['calendar_resource_backend1', true, $backend1,],
58
-				['calendar_resource_backend2', true, $backend2,],
57
+				['calendar_resource_backend1', true, $backend1, ],
58
+				['calendar_resource_backend2', true, $backend2, ],
59 59
 			]);
60 60
 
61 61
 		$this->manager->registerBackend('calendar_resource_backend1');
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 		$this->server->expects(self::exactly(2))
100 100
 			->method('query')
101 101
 			->willReturnMap([
102
-				['calendar_resource_backend1', true, $backend1,],
103
-				['calendar_resource_backend2', true, $backend2,],
102
+				['calendar_resource_backend1', true, $backend1, ],
103
+				['calendar_resource_backend2', true, $backend2, ],
104 104
 			]);
105 105
 
106 106
 		$this->manager->registerBackend('calendar_resource_backend1');
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 		$this->server->expects(self::exactly(2))
119 119
 			->method('query')
120 120
 			->willReturnMap([
121
-				['calendar_resource_backend1', true, $backend1,],
122
-				['calendar_resource_backend2', true, $backend2,],
121
+				['calendar_resource_backend1', true, $backend1, ],
122
+				['calendar_resource_backend2', true, $backend2, ],
123 123
 			]);
124 124
 
125 125
 		$this->manager->registerBackend('calendar_resource_backend1');
Please login to merge, or discard this patch.
tests/lib/FilesMetadata/FilesMetadataManagerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
 		$this->jobList = $this->createMock(JobList::class);
51 51
 		$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
52
-		$this->eventDispatcher->method('dispatchTyped')->willReturnCallback(function (Event $event) {
52
+		$this->eventDispatcher->method('dispatchTyped')->willReturnCallback(function(Event $event) {
53 53
 			if ($event instanceof AMetadataEvent) {
54 54
 				$name = $event->getNode()->getName();
55 55
 				if (isset($this->metadata[$name])) {
Please login to merge, or discard this patch.
tests/lib/Updater/ReleaseMetadataTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 use PHPUnit\Framework\MockObject\MockObject;
14 14
 
15 15
 class ReleaseMetadataTest extends \Test\TestCase {
16
-	private IClientService|MockObject $clientService;
16
+	private IClientService | MockObject $clientService;
17 17
 
18 18
 	protected function setUp(): void {
19 19
 		parent::setUp();
Please login to merge, or discard this patch.
tests/lib/Group/ManagerTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
 			->getMock();
94 94
 		$backend->expects($this->any())
95 95
 			->method('implementsActions')
96
-			->willReturnCallback(function ($actions) use ($implementedActions) {
97
-				return (bool)($actions & $implementedActions);
96
+			->willReturnCallback(function($actions) use ($implementedActions) {
97
+				return (bool) ($actions & $implementedActions);
98 98
 			});
99 99
 		return $backend;
100 100
 	}
@@ -186,12 +186,12 @@  discard block
 block discarded – undo
186 186
 		$backend->expects($this->any())
187 187
 			->method('groupExists')
188 188
 			->with('group1')
189
-			->willReturnCallback(function () use (&$backendGroupCreated) {
189
+			->willReturnCallback(function() use (&$backendGroupCreated) {
190 190
 				return $backendGroupCreated;
191 191
 			});
192 192
 		$backend->expects($this->once())
193 193
 			->method('createGroup')
194
-			->willReturnCallback(function () use (&$backendGroupCreated) {
194
+			->willReturnCallback(function() use (&$backendGroupCreated) {
195 195
 				$backendGroupCreated = true;
196 196
 				return true;
197 197
 			});
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 
576 576
 		$backend->expects($this->any())
577 577
 			->method('inGroup')
578
-			->willReturnCallback(function ($uid, $gid) {
578
+			->willReturnCallback(function($uid, $gid) {
579 579
 				switch ($uid) {
580 580
 					case 'user1': return false;
581 581
 					case 'user2': return true;
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 		$this->userManager->expects($this->any())
590 590
 			->method('searchDisplayName')
591 591
 			->with('user3')
592
-			->willReturnCallback(function ($search, $limit, $offset) {
592
+			->willReturnCallback(function($search, $limit, $offset) {
593 593
 				switch ($offset) {
594 594
 					case 0: return ['user3' => $this->getTestUser('user3'),
595 595
 						'user33' => $this->getTestUser('user33')];
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 			});
600 600
 		$this->userManager->expects($this->any())
601 601
 			->method('get')
602
-			->willReturnCallback(function ($uid) {
602
+			->willReturnCallback(function($uid) {
603 603
 				switch ($uid) {
604 604
 					case 'user1': return $this->getTestUser('user1');
605 605
 					case 'user2': return $this->getTestUser('user2');
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
 
634 634
 		$backend->expects($this->any())
635 635
 			->method('inGroup')
636
-			->willReturnCallback(function ($uid, $gid) {
636
+			->willReturnCallback(function($uid, $gid) {
637 637
 				switch ($uid) {
638 638
 					case 'user1': return false;
639 639
 					case 'user2': return true;
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
 		$this->userManager->expects($this->any())
649 649
 			->method('searchDisplayName')
650 650
 			->with('user3')
651
-			->willReturnCallback(function ($search, $limit, $offset) {
651
+			->willReturnCallback(function($search, $limit, $offset) {
652 652
 				switch ($offset) {
653 653
 					case 0: return ['user3' => $this->getTestUser('user3'),
654 654
 						'user33' => $this->getTestUser('user33')];
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
 			});
659 659
 		$this->userManager->expects($this->any())
660 660
 			->method('get')
661
-			->willReturnCallback(function ($uid) {
661
+			->willReturnCallback(function($uid) {
662 662
 				switch ($uid) {
663 663
 					case 'user1': return $this->getTestUser('user1');
664 664
 					case 'user2': return $this->getTestUser('user2');
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 
695 695
 		$backend->expects($this->any())
696 696
 			->method('inGroup')
697
-			->willReturnCallback(function ($uid) {
697
+			->willReturnCallback(function($uid) {
698 698
 				switch ($uid) {
699 699
 					case 'user1': return false;
700 700
 					case 'user2': return true;
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 		$this->userManager->expects($this->any())
710 710
 			->method('searchDisplayName')
711 711
 			->with('user3')
712
-			->willReturnCallback(function ($search, $limit, $offset) {
712
+			->willReturnCallback(function($search, $limit, $offset) {
713 713
 				switch ($offset) {
714 714
 					case 0:
715 715
 						return [
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 			});
723 723
 		$this->userManager->expects($this->any())
724 724
 			->method('get')
725
-			->willReturnCallback(function ($uid) {
725
+			->willReturnCallback(function($uid) {
726 726
 				switch ($uid) {
727 727
 					case 'user1': return $this->getTestUser('user1');
728 728
 					case 'user2': return $this->getTestUser('user2');
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
 		$backend->expects($this->any())
840 840
 			->method('getUserGroups')
841 841
 			->with('user1')
842
-			->willReturnCallback(function () use (&$expectedGroups) {
842
+			->willReturnCallback(function() use (&$expectedGroups) {
843 843
 				return $expectedGroups;
844 844
 			});
845 845
 		$backend->expects($this->any())
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
 		$backend->expects($this->any())
877 877
 			->method('getUserGroups')
878 878
 			->with('user1')
879
-			->willReturnCallback(function () use (&$expectedGroups) {
879
+			->willReturnCallback(function() use (&$expectedGroups) {
880 880
 				return $expectedGroups;
881 881
 			});
882 882
 		$backend->expects($this->any())
Please login to merge, or discard this patch.
tests/lib/AppFramework/Services/AppConfigTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 use Test\TestCase;
19 19
 
20 20
 class AppConfigTest extends TestCase {
21
-	private IConfig|MockObject $config;
22
-	private IAppConfigCore|MockObject $appConfigCore;
21
+	private IConfig | MockObject $config;
22
+	private IAppConfigCore | MockObject $appConfigCore;
23 23
 	private AppConfig $appConfig;
24 24
 
25 25
 	private const TEST_APPID = 'appconfig-test';
Please login to merge, or discard this patch.
tests/lib/AppFramework/Http/StreamResponseTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	}
51 51
 
52 52
 	public function testOutputNotFound(): void {
53
-		$path = __FILE__ . 'test';
53
+		$path = __FILE__.'test';
54 54
 		$this->output->expects($this->once())
55 55
 			->method('getHttpResponseCode')
56 56
 			->willReturn(Http::STATUS_OK);
Please login to merge, or discard this patch.
tests/lib/AppFramework/Http/RequestTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -489,14 +489,14 @@  discard block
 block discarded – undo
489 489
 
490 490
 	public function testPutStream(): void {
491 491
 		global $data;
492
-		$data = file_get_contents(__DIR__ . '/../../../data/testimage.png');
492
+		$data = file_get_contents(__DIR__.'/../../../data/testimage.png');
493 493
 
494 494
 		$vars = [
495 495
 			'put' => $data,
496 496
 			'method' => 'PUT',
497 497
 			'server' => [
498 498
 				'CONTENT_TYPE' => 'image/png',
499
-				'CONTENT_LENGTH' => (string)strlen($data)
499
+				'CONTENT_LENGTH' => (string) strlen($data)
500 500
 			],
501 501
 		];
502 502
 
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 	public function testGetServerProtocolWithProtoValid(): void {
804 804
 		$this->config
805 805
 			->method('getSystemValue')
806
-			->willReturnCallback(function ($key, $default) {
806
+			->willReturnCallback(function($key, $default) {
807 807
 				if ($key === 'trusted_proxies') {
808 808
 					return ['1.2.3.4'];
809 809
 				}
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
 	public function testGetServerProtocolWithHttpsServerValueOn(): void {
845 845
 		$this->config
846 846
 			->method('getSystemValue')
847
-			->willReturnCallback(function ($key, $default) {
847
+			->willReturnCallback(function($key, $default) {
848 848
 				return $default;
849 849
 			});
850 850
 
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 	public function testGetServerProtocolWithHttpsServerValueOff(): void {
866 866
 		$this->config
867 867
 			->method('getSystemValue')
868
-			->willReturnCallback(function ($key, $default) {
868
+			->willReturnCallback(function($key, $default) {
869 869
 				return $default;
870 870
 			});
871 871
 
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 	public function testGetServerProtocolWithHttpsServerValueEmpty(): void {
887 887
 		$this->config
888 888
 			->method('getSystemValue')
889
-			->willReturnCallback(function ($key, $default) {
889
+			->willReturnCallback(function($key, $default) {
890 890
 				return $default;
891 891
 			});
892 892
 
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
 	public function testGetServerProtocolDefault(): void {
908 908
 		$this->config
909 909
 			->method('getSystemValue')
910
-			->willReturnCallback(function ($key, $default) {
910
+			->willReturnCallback(function($key, $default) {
911 911
 				return $default;
912 912
 			});
913 913
 
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 	public function testGetServerProtocolBehindLoadBalancers(): void {
925 925
 		$this->config
926 926
 			->method('getSystemValue')
927
-			->willReturnCallback(function ($key, $default) {
927
+			->willReturnCallback(function($key, $default) {
928 928
 				if ($key === 'trusted_proxies') {
929 929
 					return ['1.2.3.4'];
930 930
 				}
@@ -1200,7 +1200,7 @@  discard block
 block discarded – undo
1200 1200
 	public function testInsecureServerHostHttpFromForwardedHeaderSingle(): void {
1201 1201
 		$this->config
1202 1202
 			->method('getSystemValue')
1203
-			->willReturnCallback(function ($key, $default) {
1203
+			->willReturnCallback(function($key, $default) {
1204 1204
 				if ($key === 'trusted_proxies') {
1205 1205
 					return ['1.2.3.4'];
1206 1206
 				}
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
 	public function testInsecureServerHostHttpFromForwardedHeaderStacked(): void {
1230 1230
 		$this->config
1231 1231
 			->method('getSystemValue')
1232
-			->willReturnCallback(function ($key, $default) {
1232
+			->willReturnCallback(function($key, $default) {
1233 1233
 				if ($key === 'trusted_proxies') {
1234 1234
 					return ['1.2.3.4'];
1235 1235
 				}
@@ -1258,7 +1258,7 @@  discard block
 block discarded – undo
1258 1258
 	public function testGetServerHostWithOverwriteHost(): void {
1259 1259
 		$this->config
1260 1260
 			->method('getSystemValueString')
1261
-			->willReturnCallback(function ($key, $default) {
1261
+			->willReturnCallback(function($key, $default) {
1262 1262
 				if ($key === 'overwritecondaddr') {
1263 1263
 					return '';
1264 1264
 				} elseif ($key === 'overwritehost') {
@@ -1282,7 +1282,7 @@  discard block
 block discarded – undo
1282 1282
 	public function testGetServerHostWithTrustedDomain(): void {
1283 1283
 		$this->config
1284 1284
 			->method('getSystemValue')
1285
-			->willReturnCallback(function ($key, $default) {
1285
+			->willReturnCallback(function($key, $default) {
1286 1286
 				if ($key === 'trusted_proxies') {
1287 1287
 					return ['1.2.3.4'];
1288 1288
 				} elseif ($key === 'trusted_domains') {
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
 	public function testGetServerHostWithUntrustedDomain(): void {
1312 1312
 		$this->config
1313 1313
 			->method('getSystemValue')
1314
-			->willReturnCallback(function ($key, $default) {
1314
+			->willReturnCallback(function($key, $default) {
1315 1315
 				if ($key === 'trusted_proxies') {
1316 1316
 					return ['1.2.3.4'];
1317 1317
 				} elseif ($key === 'trusted_domains') {
@@ -1340,7 +1340,7 @@  discard block
 block discarded – undo
1340 1340
 	public function testGetServerHostWithNoTrustedDomain(): void {
1341 1341
 		$this->config
1342 1342
 			->method('getSystemValue')
1343
-			->willReturnCallback(function ($key, $default) {
1343
+			->willReturnCallback(function($key, $default) {
1344 1344
 				if ($key === 'trusted_proxies') {
1345 1345
 					return ['1.2.3.4'];
1346 1346
 				}
@@ -1378,7 +1378,7 @@  discard block
 block discarded – undo
1378 1378
 	public function testGetServerHostTrustedDomain(string $expected, $trustedDomain): void {
1379 1379
 		$this->config
1380 1380
 			->method('getSystemValue')
1381
-			->willReturnCallback(function ($key, $default) use ($trustedDomain) {
1381
+			->willReturnCallback(function($key, $default) use ($trustedDomain) {
1382 1382
 				if ($key === 'trusted_proxies') {
1383 1383
 					return ['1.2.3.4'];
1384 1384
 				}
Please login to merge, or discard this patch.
tests/lib/AppFramework/Http/RequestStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	public function stream_write(string $data): int {
33 33
 		$left = substr($GLOBALS[$this->varname], 0, $this->position);
34 34
 		$right = substr($GLOBALS[$this->varname], $this->position + strlen($data));
35
-		$GLOBALS[$this->varname] = $left . $data . $right;
35
+		$GLOBALS[$this->varname] = $left.$data.$right;
36 36
 		$this->position += strlen($data);
37 37
 		return strlen($data);
38 38
 	}
Please login to merge, or discard this patch.