Completed
Push — master ( 176f57...2c53d3 )
by Daniel
32:12
created
tests/lib/Preview/BackgroundCleanupJobTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 		$files = [];
98 98
 		for ($i = 0; $i < 11; $i++) {
99
-			$file = $userFolder->newFile($i . '.txt');
99
+			$file = $userFolder->newFile($i.'.txt');
100 100
 			$file->putContent('hello world!');
101 101
 			$this->previewManager->getPreview($file);
102 102
 			$files[] = $file;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 		foreach ($fileIds as $fileId) {
112 112
 			try {
113
-				$previewRoot->getFolder((string)$fileId);
113
+				$previewRoot->getFolder((string) $fileId);
114 114
 			} catch (NotFoundException $e) {
115 115
 				continue;
116 116
 			}
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
 	public function testCleanupSystemCron(): void {
125 125
 		$files = $this->setup11Previews();
126
-		$fileIds = array_map(function (File $f) {
126
+		$fileIds = array_map(function(File $f) {
127 127
 			return $f->getId();
128 128
 		}, $files);
129 129
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 			return;
152 152
 		}
153 153
 		$files = $this->setup11Previews();
154
-		$fileIds = array_map(function (File $f) {
154
+		$fileIds = array_map(function(File $f) {
155 155
 			return $f->getId();
156 156
 		}, $files);
157 157
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$f1->newFile('foo.jpg', 'foo');
189 189
 		$f2 = $appdata->newFolder('123456782');
190 190
 		$f2->newFile('foo.jpg', 'foo');
191
-		$f2 = $appdata->newFolder((string)PHP_INT_MAX - 1);
191
+		$f2 = $appdata->newFolder((string) PHP_INT_MAX - 1);
192 192
 		$f2->newFile('foo.jpg', 'foo');
193 193
 
194 194
 		/*
Please login to merge, or discard this patch.
tests/lib/App/AppStore/Bundles/BundleBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 		parent::setUp();
27 27
 		$this->l10n = $this->createMock(IL10N::class);
28 28
 		$this->l10n->method('t')
29
-			->willReturnCallback(function ($text, $parameters = []) {
29
+			->willReturnCallback(function($text, $parameters = []) {
30 30
 				return vsprintf($text, $parameters);
31 31
 			});
32 32
 	}
Please login to merge, or discard this patch.
tests/lib/App/AppStore/Fetcher/AppFetcherTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1858,7 +1858,7 @@  discard block
 block discarded – undo
1858 1858
 
1859 1859
 	public function testGetWithFilter(): void {
1860 1860
 		$this->config->method('getSystemValueString')
1861
-			->willReturnCallback(function ($key, $default) {
1861
+			->willReturnCallback(function($key, $default) {
1862 1862
 				if ($key === 'version') {
1863 1863
 					return '11.0.0.2';
1864 1864
 				} elseif ($key === 'appstoreurl' && $default === 'https://apps.nextcloud.com/api/v1') {
@@ -1942,7 +1942,7 @@  discard block
 block discarded – undo
1942 1942
 	public function testAppstoreDisabled(): void {
1943 1943
 		$this->config
1944 1944
 			->method('getSystemValueString')
1945
-			->willReturnCallback(function ($var, $default) {
1945
+			->willReturnCallback(function($var, $default) {
1946 1946
 				if ($var === 'version') {
1947 1947
 					return '11.0.0.2';
1948 1948
 				}
@@ -1950,7 +1950,7 @@  discard block
 block discarded – undo
1950 1950
 			});
1951 1951
 		$this->config
1952 1952
 			->method('getSystemValueBool')
1953
-			->willReturnCallback(function ($var, $default) {
1953
+			->willReturnCallback(function($var, $default) {
1954 1954
 				if ($var === 'has_internet_connection') {
1955 1955
 					return true;
1956 1956
 				} elseif ($var === 'appstoreenabled') {
@@ -1969,7 +1969,7 @@  discard block
 block discarded – undo
1969 1969
 	public function testNoInternet(): void {
1970 1970
 		$this->config
1971 1971
 			->method('getSystemValueString')
1972
-			->willReturnCallback(function ($var, $default) {
1972
+			->willReturnCallback(function($var, $default) {
1973 1973
 				if ($var === 'has_internet_connection') {
1974 1974
 					return false;
1975 1975
 				} elseif ($var === 'version') {
@@ -1979,7 +1979,7 @@  discard block
 block discarded – undo
1979 1979
 			});
1980 1980
 		$this->config
1981 1981
 			->method('getSystemValueBool')
1982
-			->willReturnCallback(function ($var, $default) {
1982
+			->willReturnCallback(function($var, $default) {
1983 1983
 				if ($var === 'has_internet_connection') {
1984 1984
 					return false;
1985 1985
 				} elseif ($var === 'appstoreenabled') {
@@ -1996,7 +1996,7 @@  discard block
 block discarded – undo
1996 1996
 
1997 1997
 	public function testSetVersion(): void {
1998 1998
 		$this->config->method('getSystemValueString')
1999
-			->willReturnCallback(function ($key, $default) {
1999
+			->willReturnCallback(function($key, $default) {
2000 2000
 				if ($key === 'version') {
2001 2001
 					return '10.0.7.2';
2002 2002
 				} elseif ($key === 'appstoreurl' && $default === 'https://apps.nextcloud.com/api/v1') {
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
 
2081 2081
 	public function testGetAppsAllowlist(): void {
2082 2082
 		$this->config->method('getSystemValueString')
2083
-			->willReturnCallback(function ($key, $default) {
2083
+			->willReturnCallback(function($key, $default) {
2084 2084
 				if ($key === 'version') {
2085 2085
 					return '11.0.0.2';
2086 2086
 				} else {
@@ -2088,14 +2088,14 @@  discard block
 block discarded – undo
2088 2088
 				}
2089 2089
 			});
2090 2090
 		$this->config->method('getSystemValue')
2091
-			->willReturnCallback(function ($key, $default) {
2091
+			->willReturnCallback(function($key, $default) {
2092 2092
 				if ($key === 'appsallowlist') {
2093 2093
 					return ['contacts'];
2094 2094
 				}
2095 2095
 				return $default;
2096 2096
 			});
2097 2097
 		$this->config->method('getAppValue')
2098
-			->willReturnCallback(function ($app, $key, $default) {
2098
+			->willReturnCallback(function($app, $key, $default) {
2099 2099
 				if ($app === 'support' && $key === 'subscription_key') {
2100 2100
 					return 'subscription-key';
2101 2101
 				}
@@ -2169,7 +2169,7 @@  discard block
 block discarded – undo
2169 2169
 
2170 2170
 	public function testGetAppsAllowlistCustomAppstore(): void {
2171 2171
 		$this->config->method('getSystemValueString')
2172
-			->willReturnCallback(function ($key, $default) {
2172
+			->willReturnCallback(function($key, $default) {
2173 2173
 				if ($key === 'version') {
2174 2174
 					return '11.0.0.2';
2175 2175
 				} elseif ($key === 'appstoreurl' && $default === 'https://apps.nextcloud.com/api/v1') {
@@ -2179,7 +2179,7 @@  discard block
 block discarded – undo
2179 2179
 				}
2180 2180
 			});
2181 2181
 		$this->config->method('getSystemValue')
2182
-			->willReturnCallback(function ($key, $default) {
2182
+			->willReturnCallback(function($key, $default) {
2183 2183
 				if ($key === 'appsallowlist') {
2184 2184
 					return ['contacts'];
2185 2185
 				} else {
Please login to merge, or discard this patch.
tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	public function testAppstoreDisabled(): void {
28 28
 		$this->config
29 29
 			->method('getSystemValueBool')
30
-			->willReturnCallback(function ($var, $default) {
30
+			->willReturnCallback(function($var, $default) {
31 31
 				if ($var === 'appstoreenabled') {
32 32
 					return false;
33 33
 				}
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	public function testNoInternet(): void {
44 44
 		$this->config
45 45
 			->method('getSystemValueBool')
46
-			->willReturnCallback(function ($var, $default) {
46
+			->willReturnCallback(function($var, $default) {
47 47
 				if ($var === 'has_internet_connection') {
48 48
 					return false;
49 49
 				}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			});
52 52
 		$this->config
53 53
 			->method('getSystemValueString')
54
-			->willReturnCallback(function ($var, $default) {
54
+			->willReturnCallback(function($var, $default) {
55 55
 				return $default;
56 56
 			});
57 57
 		$this->appData
Please login to merge, or discard this patch.
tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 use PHPUnit\Framework\MockObject\MockObject;
15 15
 
16 16
 class AppDiscoverFetcherTest extends FetcherBase {
17
-	protected CompareVersion|MockObject $compareVersion;
17
+	protected CompareVersion | MockObject $compareVersion;
18 18
 
19 19
 	protected function setUp(): void {
20 20
 		parent::setUp();
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	public function testAppstoreDisabled(): void {
38 38
 		$this->config
39 39
 			->method('getSystemValueBool')
40
-			->willReturnCallback(function ($var, $default) {
40
+			->willReturnCallback(function($var, $default) {
41 41
 				if ($var === 'appstoreenabled') {
42 42
 					return false;
43 43
 				}
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	public function testNoInternet(): void {
54 54
 		$this->config
55 55
 			->method('getSystemValueBool')
56
-			->willReturnCallback(function ($var, $default) {
56
+			->willReturnCallback(function($var, $default) {
57 57
 				if ($var === 'has_internet_connection') {
58 58
 					return false;
59 59
 				}
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			});
62 62
 		$this->config
63 63
 			->method('getSystemValueString')
64
-			->willReturnCallback(function ($var, $default) {
64
+			->willReturnCallback(function($var, $default) {
65 65
 				return $default;
66 66
 			});
67 67
 		$this->appData
Please login to merge, or discard this patch.
tests/lib/App/AppStore/Fetcher/FetcherBase.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	public function testGetWithAlreadyExistingFileAndUpToDateTimestampAndVersion(): void {
63 63
 		$this->config
64 64
 			->method('getSystemValueString')
65
-			->willReturnCallback(function ($var, $default) {
65
+			->willReturnCallback(function($var, $default) {
66 66
 				if ($var === 'version') {
67 67
 					return '11.0.0.2';
68 68
 				}
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	public function testGetWithNotExistingFileAndUpToDateTimestampAndVersion(): void {
104 104
 		$this->config
105 105
 			->method('getSystemValueString')
106
-			->willReturnCallback(function ($var, $default) {
106
+			->willReturnCallback(function($var, $default) {
107 107
 				if ($var === 'appstoreurl') {
108 108
 					return 'https://apps.nextcloud.com/api/v1';
109 109
 				} elseif ($var === 'version') {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
 	public function testGetWithAlreadyExistingFileAndOutdatedTimestamp(): void {
179 179
 		$this->config->method('getSystemValueString')
180
-			->willReturnCallback(function ($key, $default) {
180
+			->willReturnCallback(function($key, $default) {
181 181
 				if ($key === 'version') {
182 182
 					return '11.0.0.2';
183 183
 				} else {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	public function testGetWithAlreadyExistingFileAndNoVersion(): void {
253 253
 		$this->config
254 254
 			->method('getSystemValueString')
255
-			->willReturnCallback(function ($var, $default) {
255
+			->willReturnCallback(function($var, $default) {
256 256
 				if ($var === 'appstoreurl') {
257 257
 					return 'https://apps.nextcloud.com/api/v1';
258 258
 				} elseif ($var === 'version') {
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	public function testGetWithAlreadyExistingFileAndOutdatedVersion(): void {
326 326
 		$this->config
327 327
 			->method('getSystemValueString')
328
-			->willReturnCallback(function ($var, $default) {
328
+			->willReturnCallback(function($var, $default) {
329 329
 				if ($var === 'appstoreurl') {
330 330
 					return 'https://apps.nextcloud.com/api/v1';
331 331
 				} elseif ($var === 'version') {
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 
433 433
 	public function testGetMatchingETag(): void {
434 434
 		$this->config->method('getSystemValueString')
435
-			->willReturnCallback(function ($key, $default) {
435
+			->willReturnCallback(function($key, $default) {
436 436
 				if ($key === 'version') {
437 437
 					return '11.0.0.2';
438 438
 				} else {
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 
512 512
 	public function testGetNoMatchingETag(): void {
513 513
 		$this->config->method('getSystemValueString')
514
-			->willReturnCallback(function ($key, $default) {
514
+			->willReturnCallback(function($key, $default) {
515 515
 				if ($key === 'version') {
516 516
 					return '11.0.0.2';
517 517
 				} else {
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 
597 597
 	public function testFetchAfterUpgradeNoETag(): void {
598 598
 		$this->config->method('getSystemValueString')
599
-			->willReturnCallback(function ($key, $default) {
599
+			->willReturnCallback(function($key, $default) {
600 600
 				if ($key === 'version') {
601 601
 					return '11.0.0.3';
602 602
 				} else {
Please login to merge, or discard this patch.
tests/lib/Traits/ClientServiceTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 			->willReturn($this->client);
45 45
 		$this->client->expects($this->any())
46 46
 			->method('get')
47
-			->willReturnCallback(function ($url) {
47
+			->willReturnCallback(function($url) {
48 48
 				if (!isset($this->expectedGetRequests[$url])) {
49
-					throw new \Exception('unexpected request: ' . $url);
49
+					throw new \Exception('unexpected request: '.$url);
50 50
 				}
51 51
 				$result = $this->expectedGetRequests[$url];
52 52
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 			});
63 63
 		$this->client->expects($this->any())
64 64
 			->method('post')
65
-			->willReturnCallback(function ($url) {
65
+			->willReturnCallback(function($url) {
66 66
 				if (!isset($this->expectedPostRequests[$url])) {
67
-					throw new \Exception('unexpected request: ' . $url);
67
+					throw new \Exception('unexpected request: '.$url);
68 68
 				}
69 69
 				$result = $this->expectedPostRequests[$url];
70 70
 
Please login to merge, or discard this patch.
tests/lib/DirectEditing/ManagerTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	}
54 54
 
55 55
 	public function getMimetypes(): array {
56
-		return [ 'text/plain' ];
56
+		return ['text/plain'];
57 57
 	}
58 58
 
59 59
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
 
164 164
 	public function testCreateToken(): void {
165
-		$expectedToken = 'TOKEN' . time();
165
+		$expectedToken = 'TOKEN'.time();
166 166
 		$file = $this->createMock(File::class);
167 167
 		$file->expects($this->any())
168 168
 			->method('getId')
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	}
188 188
 
189 189
 	public function testCreateTokenAccess(): void {
190
-		$expectedToken = 'TOKEN' . time();
190
+		$expectedToken = 'TOKEN'.time();
191 191
 		$file = $this->createMock(File::class);
192 192
 		$file->expects($this->any())
193 193
 			->method('getId')
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	}
216 216
 
217 217
 	public function testOpenByPath(): void {
218
-		$expectedToken = 'TOKEN' . time();
218
+		$expectedToken = 'TOKEN'.time();
219 219
 		$file = $this->createMock(File::class);
220 220
 		$file->expects($this->any())
221 221
 			->method('getId')
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	}
247 247
 
248 248
 	public function testOpenById(): void {
249
-		$expectedToken = 'TOKEN' . time();
249
+		$expectedToken = 'TOKEN'.time();
250 250
 		$fileRead = $this->createMock(File::class);
251 251
 		$fileRead->method('getPermissions')
252 252
 			->willReturn(1);
Please login to merge, or discard this patch.
tests/lib/Avatar/GuestAvatarTest.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
 		$avatar = $this->guestAvatar->getFile(32);
50 50
 		self::assertInstanceOf(InMemoryFile::class, $avatar);
51 51
 		$expectedFile = file_get_contents(
52
-			__DIR__ . '/../../data/guest_avatar_einstein_32.png'
52
+			__DIR__.'/../../data/guest_avatar_einstein_32.png'
53 53
 		);
54 54
 		self::assertEquals(trim($expectedFile), trim($avatar->getContent()));
55 55
 	}
Please login to merge, or discard this patch.