Passed
Push — master ( b2075d...4ac4f4 )
by Joas
28:52 queued 14:19
created
core/Command/App/Disable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,14 +72,14 @@
 block discarded – undo
72 72
 
73 73
 	private function disableApp(string $appId, OutputInterface $output): void {
74 74
 		if ($this->appManager->isInstalled($appId) === false) {
75
-			$output->writeln('No such app enabled: ' . $appId);
75
+			$output->writeln('No such app enabled: '.$appId);
76 76
 			return;
77 77
 		}
78 78
 
79 79
 		try {
80 80
 			$this->appManager->disableApp($appId);
81 81
 			$appVersion = \OC_App::getAppVersion($appId);
82
-			$output->writeln($appId . ' ' . $appVersion . ' disabled');
82
+			$output->writeln($appId.' '.$appVersion.' disabled');
83 83
 		} catch (\Exception $e) {
84 84
 			$output->writeln($e->getMessage());
85 85
 			$this->exitCode = 2;
Please login to merge, or discard this patch.
core/Command/App/Enable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
 	 * @param OutputInterface $output
103 103
 	 */
104 104
 	private function enableApp(string $appId, array $groupIds, bool $forceEnable, OutputInterface $output): void {
105
-		$groupNames = array_map(function (IGroup $group) {
105
+		$groupNames = array_map(function(IGroup $group) {
106 106
 			return $group->getDisplayName();
107 107
 		}, $groupIds);
108 108
 
109 109
 		if ($this->appManager->isInstalled($appId) && $groupIds === []) {
110
-			$output->writeln($appId . ' already enabled');
110
+			$output->writeln($appId.' already enabled');
111 111
 			return;
112 112
 		}
113 113
 
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
 
125 125
 			if ($groupIds === []) {
126 126
 				$this->appManager->enableApp($appId, $forceEnable);
127
-				$output->writeln($appId . ' ' . $appVersion . ' enabled');
127
+				$output->writeln($appId.' '.$appVersion.' enabled');
128 128
 			} else {
129 129
 				$this->appManager->enableAppForGroups($appId, $groupIds, $forceEnable);
130
-				$output->writeln($appId . ' ' . $appVersion . ' enabled for groups: ' . implode(', ', $groupNames));
130
+				$output->writeln($appId.' '.$appVersion.' enabled for groups: '.implode(', ', $groupNames));
131 131
 			}
132 132
 		} catch (AppPathNotFoundException $e) {
133
-			$output->writeln($appId . ' not found');
133
+			$output->writeln($appId.' not found');
134 134
 			$this->exitCode = 1;
135 135
 		} catch (\Exception $e) {
136 136
 			$output->writeln($e->getMessage());
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function completeOptionValues($optionName, CompletionContext $context) {
162 162
 		if ($optionName === 'groups') {
163
-			return array_map(function (IGroup $group) {
163
+			return array_map(function(IGroup $group) {
164 164
 				return $group->getGID();
165 165
 			}, $this->groupManager->search($context->getCurrentWord()));
166 166
 		}
Please login to merge, or discard this patch.
core/Command/App/Remove.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 
81 81
 		// Check if the app is installed
82 82
 		if (!\OC_App::getAppPath($appId)) {
83
-			$output->writeln($appId . ' is not installed');
83
+			$output->writeln($appId.' is not installed');
84 84
 			return 1;
85 85
 		}
86 86
 
87 87
 		// Removing shipped apps is not possible, therefore we pre-check that
88 88
 		// before trying to remove it
89 89
 		if ($this->manager->isShipped($appId)) {
90
-			$output->writeln($appId . ' could not be removed as it is a shipped app');
90
+			$output->writeln($appId.' could not be removed as it is a shipped app');
91 91
 			return 1;
92 92
 		}
93 93
 
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
 		if (!$input->getOption('keep-data')) {
97 97
 			try {
98 98
 				$this->manager->disableApp($appId);
99
-				$output->writeln($appId . ' disabled');
99
+				$output->writeln($appId.' disabled');
100 100
 			} catch (Throwable $e) {
101
-				$output->writeln('<error>Error: ' . $e->getMessage() . '</error>');
101
+				$output->writeln('<error>Error: '.$e->getMessage().'</error>');
102 102
 				$this->logger->logException($e, [
103 103
 					'app' => 'CLI',
104 104
 					'level' => ILogger::ERROR
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		try {
112 112
 			$result = $this->installer->removeApp($appId);
113 113
 		} catch (Throwable $e) {
114
-			$output->writeln('<error>Error: ' . $e->getMessage() . '</error>');
114
+			$output->writeln('<error>Error: '.$e->getMessage().'</error>');
115 115
 			$this->logger->logException($e, [
116 116
 				'app' => 'CLI',
117 117
 				'level' => ILogger::ERROR
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
 		}
121 121
 
122 122
 		if ($result === false) {
123
-			$output->writeln($appId . ' could not be removed');
123
+			$output->writeln($appId.' could not be removed');
124 124
 			return 1;
125 125
 		}
126 126
 
127 127
 		$appVersion = \OC_App::getAppVersion($appId);
128
-		$output->writeln($appId . ' ' . $appVersion . ' removed');
128
+		$output->writeln($appId.' '.$appVersion.' removed');
129 129
 
130 130
 		return 0;
131 131
 	}
Please login to merge, or discard this patch.
lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		$result = $query->execute();
61 61
 		$providers = [];
62 62
 		foreach ($result->fetchAll() as $row) {
63
-			$providers[$row['provider_id']] = 1 === (int)$row['enabled'];
63
+			$providers[$row['provider_id']] = 1 === (int) $row['enabled'];
64 64
 		}
65 65
 		$result->closeCursor();
66 66
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 			->where($qb2->expr()->eq('uid', $qb2->createNamedParameter($uid)));
115 115
 		$deleteQuery->execute();
116 116
 
117
-		return array_map(function (array $row) {
117
+		return array_map(function(array $row) {
118 118
 			return [
119 119
 				'provider_id' => $row['provider_id'],
120 120
 				'uid' => $row['uid'],
Please login to merge, or discard this patch.
lib/private/Search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		$this->initProviders();
53 53
 		$results = [];
54 54
 		foreach ($this->providers as $provider) {
55
-			if (! $provider->providesResultsFor($inApps)) {
55
+			if (!$provider->providesResultsFor($inApps)) {
56 56
 				continue;
57 57
 			}
58 58
 			if ($provider instanceof PagedProvider) {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	public function removeProvider($provider) {
88 88
 		$this->registeredProviders = array_filter(
89 89
 			$this->registeredProviders,
90
-			function ($element) use ($provider) {
90
+			function($element) use ($provider) {
91 91
 				return ($element['class'] != $provider);
92 92
 			}
93 93
 		);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 * Create instances of all the registered search providers
109 109
 	 */
110 110
 	private function initProviders() {
111
-		if (! empty($this->providers)) {
111
+		if (!empty($this->providers)) {
112 112
 			return;
113 113
 		}
114 114
 		foreach ($this->registeredProviders as $provider) {
Please login to merge, or discard this patch.
lib/private/Files/Config/MountProviderCollection.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -83,13 +83,13 @@  discard block
 block discarded – undo
83 83
 	 */
84 84
 	public function getMountsForUser(IUser $user) {
85 85
 		$loader = $this->loader;
86
-		$mounts = array_map(function (IMountProvider $provider) use ($user, $loader) {
86
+		$mounts = array_map(function(IMountProvider $provider) use ($user, $loader) {
87 87
 			return $provider->getMountsForUser($user, $loader);
88 88
 		}, $this->providers);
89
-		$mounts = array_filter($mounts, function ($result) {
89
+		$mounts = array_filter($mounts, function($result) {
90 90
 			return is_array($result);
91 91
 		});
92
-		$mounts = array_reduce($mounts, function (array $mounts, array $providerMounts) {
92
+		$mounts = array_reduce($mounts, function(array $mounts, array $providerMounts) {
93 93
 			return array_merge($mounts, $providerMounts);
94 94
 		}, []);
95 95
 		return $this->filterMounts($user, $mounts);
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 		// shared mount provider gets to go last since it needs to know existing files
100 100
 		// to check for name collisions
101 101
 		$firstMounts = [];
102
-		$firstProviders = array_filter($this->providers, function (IMountProvider $provider) {
102
+		$firstProviders = array_filter($this->providers, function(IMountProvider $provider) {
103 103
 			return (get_class($provider) !== 'OCA\Files_Sharing\MountProvider');
104 104
 		});
105
-		$lastProviders = array_filter($this->providers, function (IMountProvider $provider) {
105
+		$lastProviders = array_filter($this->providers, function(IMountProvider $provider) {
106 106
 			return (get_class($provider) === 'OCA\Files_Sharing\MountProvider');
107 107
 		});
108 108
 		foreach ($firstProviders as $provider) {
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
 		$providers = array_reverse($this->homeProviders); // call the latest registered provider first to give apps an opportunity to overwrite builtin
141 141
 		foreach ($providers as $homeProvider) {
142 142
 			if ($mount = $homeProvider->getHomeMountForUser($user, $this->loader)) {
143
-				$mount->setMountPoint('/' . $user->getUID()); //make sure the mountpoint is what we expect
143
+				$mount->setMountPoint('/'.$user->getUID()); //make sure the mountpoint is what we expect
144 144
 				return $mount;
145 145
 			}
146 146
 		}
147
-		throw new \Exception('No home storage configured for user ' . $user);
147
+		throw new \Exception('No home storage configured for user '.$user);
148 148
 	}
149 149
 
150 150
 	/**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	}
164 164
 
165 165
 	private function filterMounts(IUser $user, array $mountPoints) {
166
-		return array_filter($mountPoints, function (IMountPoint $mountPoint) use ($user) {
166
+		return array_filter($mountPoints, function(IMountPoint $mountPoint) use ($user) {
167 167
 			foreach ($this->mountFilters as $filter) {
168 168
 				if ($filter($mountPoint, $user) === false) {
169 169
 					return false;
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
 	 */
216 216
 	public function getRootMounts(): array {
217 217
 		$loader = $this->loader;
218
-		$mounts = array_map(function (IRootMountProvider $provider) use ($loader) {
218
+		$mounts = array_map(function(IRootMountProvider $provider) use ($loader) {
219 219
 			return $provider->getRootMounts($loader);
220 220
 		}, $this->rootProviders);
221
-		$mounts = array_reduce($mounts, function (array $mounts, array $providerMounts) {
221
+		$mounts = array_reduce($mounts, function(array $mounts, array $providerMounts) {
222 222
 			return array_merge($mounts, $providerMounts);
223 223
 		}, []);
224 224
 		return $mounts;
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Auth/Password/UserProvided.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 	}
62 62
 
63 63
 	private function getCredentialsIdentifier($storageId) {
64
-		return self::CREDENTIALS_IDENTIFIER_PREFIX . $storageId;
64
+		return self::CREDENTIALS_IDENTIFIER_PREFIX.$storageId;
65 65
 	}
66 66
 
67 67
 	public function saveBackendOptions(IUser $user, $mountId, array $options) {
Please login to merge, or discard this patch.
apps/files_sharing/lib/ShareBackend/File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function generateTarget($itemSource, $shareWith, $exclude = null) {
99 99
 		$shareFolder = \OCA\Files_Sharing\Helper::getShareFolder();
100
-		$target = \OC\Files\Filesystem::normalizePath($shareFolder . '/' . basename($itemSource));
100
+		$target = \OC\Files\Filesystem::normalizePath($shareFolder.'/'.basename($itemSource));
101 101
 
102 102
 		// for group shares we return the target right away
103 103
 		if ($shareWith === false) {
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 		}
106 106
 
107 107
 		\OC\Files\Filesystem::initMountPoints($shareWith);
108
-		$view = new \OC\Files\View('/' . $shareWith . '/files');
108
+		$view = new \OC\Files\View('/'.$shareWith.'/files');
109 109
 
110 110
 		if (!$view->is_dir($shareFolder)) {
111 111
 			$dir = '';
112 112
 			$subdirs = explode('/', $shareFolder);
113 113
 			foreach ($subdirs as $subdir) {
114
-				$dir = $dir . '/' . $subdir;
114
+				$dir = $dir.'/'.$subdir;
115 115
 				if (!$view->is_dir($dir)) {
116 116
 					$view->mkdir($dir);
117 117
 				}
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 		if ($share['item_type'] === 'folder' && $target !== '') {
250 250
 			// note: in case of ext storage mount points the path might be empty
251 251
 			// which would cause a leading slash to appear
252
-			$share['path'] = ltrim($share['path'] . '/' . $target, '/');
252
+			$share['path'] = ltrim($share['path'].'/'.$target, '/');
253 253
 		}
254 254
 		return self::resolveReshares($share);
255 255
 	}
Please login to merge, or discard this patch.
lib/private/SystemTag/SystemTagManager.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
 			->from(self::TAG_TABLE);
142 142
 
143 143
 		if (!\is_null($visibilityFilter)) {
144
-			$query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int)$visibilityFilter)));
144
+			$query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int) $visibilityFilter)));
145 145
 		}
146 146
 
147 147
 		if (!empty($nameSearchPattern)) {
148 148
 			$query->andWhere(
149 149
 				$query->expr()->like(
150 150
 					'name',
151
-					$query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern). '%')
151
+					$query->createNamedParameter('%'.$this->connection->escapeLikeParameter($nameSearchPattern).'%')
152 152
 				)
153 153
 			);
154 154
 		}
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		$result->closeCursor();
183 183
 		if (!$row) {
184 184
 			throw new TagNotFoundException(
185
-				'Tag ("' . $tagName . '", '. $userVisible . ', ' . $userAssignable . ') does not exist'
185
+				'Tag ("'.$tagName.'", '.$userVisible.', '.$userAssignable.') does not exist'
186 186
 			);
187 187
 		}
188 188
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			$query->execute();
206 206
 		} catch (UniqueConstraintViolationException $e) {
207 207
 			throw new TagAlreadyExistsException(
208
-				'Tag ("' . $tagName . '", '. $userVisible . ', ' . $userAssignable . ') already exists',
208
+				'Tag ("'.$tagName.'", '.$userVisible.', '.$userAssignable.') already exists',
209 209
 				0,
210 210
 				$e
211 211
 			);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		$tagId = $query->getLastInsertId();
215 215
 
216 216
 		$tag = new SystemTag(
217
-			(string)$tagId,
217
+			(string) $tagId,
218 218
 			$tagName,
219 219
 			$userVisible,
220 220
 			$userAssignable
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 			}
267 267
 		} catch (UniqueConstraintViolationException $e) {
268 268
 			throw new TagAlreadyExistsException(
269
-				'Tag ("' . $newName . '", '. $userVisible . ', ' . $userAssignable . ') already exists',
269
+				'Tag ("'.$newName.'", '.$userVisible.', '.$userAssignable.') already exists',
270 270
 				0,
271 271
 				$e
272 272
 			);
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 	}
374 374
 
375 375
 	private function createSystemTagFromRow($row) {
376
-		return new SystemTag((string)$row['id'], $row['name'], (bool)$row['visibility'], (bool)$row['editable']);
376
+		return new SystemTag((string) $row['id'], $row['name'], (bool) $row['visibility'], (bool) $row['editable']);
377 377
 	}
378 378
 
379 379
 	/**
Please login to merge, or discard this patch.