Completed
Pull Request — master (#8232)
by Joas
25:31 queued 09:08
created
core/Command/Encryption/ListModules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 				if (!$item['default']) {
72 72
 					$item = $item['displayName'];
73 73
 				} else {
74
-					$item = $item['displayName'] . ' [default*]';
74
+					$item = $item['displayName'].' [default*]';
75 75
 				}
76 76
 			});
77 77
 		}
Please login to merge, or discard this patch.
core/Command/Encryption/ChangeKeyStorageRoot.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		}
143 143
 
144 144
 		$result = $this->rootView->file_put_contents(
145
-			$newRoot . '/' . Storage::KEY_STORAGE_MARKER,
145
+			$newRoot.'/'.Storage::KEY_STORAGE_MARKER,
146 146
 			'ownCloud will detect this folder as key storage root only if this file exists'
147 147
 		);
148 148
 
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	protected function moveSystemKeys($oldRoot, $newRoot) {
163 163
 		if (
164
-			$this->rootView->is_dir($oldRoot . '/files_encryption') &&
165
-			$this->targetExists($newRoot . '/files_encryption') === false
164
+			$this->rootView->is_dir($oldRoot.'/files_encryption') &&
165
+			$this->targetExists($newRoot.'/files_encryption') === false
166 166
 		) {
167
-			$this->rootView->rename($oldRoot . '/files_encryption', $newRoot . '/files_encryption');
167
+			$this->rootView->rename($oldRoot.'/files_encryption', $newRoot.'/files_encryption');
168 168
 		}
169 169
 	}
170 170
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		$progress->start();
194 194
 
195 195
 
196
-		foreach($this->userManager->getBackends() as $backend) {
196
+		foreach ($this->userManager->getBackends() as $backend) {
197 197
 			$limit = 500;
198 198
 			$offset = 0;
199 199
 			do {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 					$this->moveUserEncryptionFolder($user, $oldRoot, $newRoot);
205 205
 				}
206 206
 				$offset += $limit;
207
-			} while(count($users) >= $limit);
207
+			} while (count($users) >= $limit);
208 208
 		}
209 209
 		$progress->finish();
210 210
 	}
@@ -221,13 +221,13 @@  discard block
 block discarded – undo
221 221
 
222 222
 		if ($this->userManager->userExists($user)) {
223 223
 
224
-			$source = $oldRoot . '/' . $user . '/files_encryption';
225
-			$target = $newRoot . '/' . $user . '/files_encryption';
224
+			$source = $oldRoot.'/'.$user.'/files_encryption';
225
+			$target = $newRoot.'/'.$user.'/files_encryption';
226 226
 			if (
227 227
 				$this->rootView->is_dir($source) &&
228 228
 				$this->targetExists($target) === false
229 229
 			) {
230
-				$this->prepareParentFolder($newRoot . '/' . $user);
230
+				$this->prepareParentFolder($newRoot.'/'.$user);
231 231
 				$this->rootView->rename($source, $target);
232 232
 			}
233 233
 		}
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 			$sub_dirs = explode('/', ltrim($path, '/'));
246 246
 			$dir = '';
247 247
 			foreach ($sub_dirs as $sub_dir) {
248
-				$dir .= '/' . $sub_dir;
248
+				$dir .= '/'.$sub_dir;
249 249
 				if ($this->rootView->file_exists($dir) === false) {
250 250
 					$this->rootView->mkdir($dir);
251 251
 				}
Please login to merge, or discard this patch.
core/Command/Encryption/SetDefaultModule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@
 block discarded – undo
59 59
 		$moduleId = $input->getArgument('module');
60 60
 
61 61
 		if ($moduleId === $this->encryptionManager->getDefaultEncryptionModuleId()) {
62
-			$output->writeln('"' . $moduleId . '"" is already the default module');
62
+			$output->writeln('"'.$moduleId.'"" is already the default module');
63 63
 		} else if ($this->encryptionManager->setDefaultEncryptionModule($moduleId)) {
64
-			$output->writeln('<info>Set default module to "' . $moduleId . '"</info>');
64
+			$output->writeln('<info>Set default module to "'.$moduleId.'"</info>');
65 65
 		} else {
66
-			$output->writeln('<error>The specified module "' . $moduleId . '" does not exist</error>');
66
+			$output->writeln('<error>The specified module "'.$moduleId.'" does not exist</error>');
67 67
 		}
68 68
 	}
69 69
 }
Please login to merge, or discard this patch.
core/Command/Group/ListCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	}
72 72
 
73 73
 	protected function execute(InputInterface $input, OutputInterface $output) {
74
-		$groups = $this->groupManager->search('', (int)$input->getOption('limit'), (int)$input->getOption('offset'));
74
+		$groups = $this->groupManager->search('', (int) $input->getOption('limit'), (int) $input->getOption('offset'));
75 75
 		$this->writeArrayInOutputFormat($input, $output, $this->formatGroups($groups));
76 76
 	}
77 77
 
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 	 * @return array
81 81
 	 */
82 82
 	private function formatGroups(array $groups) {
83
-		$keys = array_map(function (IGroup $group) {
83
+		$keys = array_map(function(IGroup $group) {
84 84
 			return $group->getGID();
85 85
 		}, $groups);
86
-		$values = array_map(function (IGroup $group) {
86
+		$values = array_map(function(IGroup $group) {
87 87
 			return array_keys($group->getUsers());
88 88
 		}, $groups);
89 89
 		return array_combine($keys, $values);
Please login to merge, or discard this patch.
settings/templates/users/part.setquota.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@
 block discarded – undo
1 1
 <div class="quota">
2 2
 	<!-- Default storage -->
3
-	<span><?php p($l->t('Default quota'));?></span>
4
-	<?php if((bool) $_['isAdmin']): ?>
3
+	<span><?php p($l->t('Default quota')); ?></span>
4
+	<?php if ((bool) $_['isAdmin']): ?>
5 5
 		<select id='default_quota' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>" data-tipsy-gravity="s">
6
-			<option <?php if($_['default_quota'] === 'none') print_unescaped('selected="selected"');?> value='none'>
7
-				<?php p($l->t('Unlimited'));?>
6
+			<option <?php if ($_['default_quota'] === 'none') print_unescaped('selected="selected"'); ?> value='none'>
7
+				<?php p($l->t('Unlimited')); ?>
8 8
 			</option>
9
-			<?php foreach($_['quota_preset'] as $preset):?>
10
-				<?php if($preset !== 'default'):?>
11
-					<option <?php if($_['default_quota']==$preset) print_unescaped('selected="selected"');?> value='<?php p($preset);?>'>
12
-						<?php p($preset);?>
9
+			<?php foreach ($_['quota_preset'] as $preset):?>
10
+				<?php if ($preset !== 'default'):?>
11
+					<option <?php if ($_['default_quota'] == $preset) print_unescaped('selected="selected"'); ?> value='<?php p($preset); ?>'>
12
+						<?php p($preset); ?>
13 13
 					</option>
14
-				<?php endif;?>
15
-			<?php endforeach;?>
16
-			<?php if($_['defaultQuotaIsUserDefined']):?>
17
-				<option selected="selected" value='<?php p($_['default_quota']);?>'>
18
-					<?php p($_['default_quota']);?>
14
+				<?php endif; ?>
15
+			<?php endforeach; ?>
16
+			<?php if ($_['defaultQuotaIsUserDefined']):?>
17
+				<option selected="selected" value='<?php p($_['default_quota']); ?>'>
18
+					<?php p($_['default_quota']); ?>
19 19
 				</option>
20
-			<?php endif;?>
20
+			<?php endif; ?>
21 21
 			<option data-new value='other'>
22
-				<?php p($l->t('Other'));?>
22
+				<?php p($l->t('Other')); ?>
23 23
 				...
24 24
 			</option>
25 25
 		</select>
26 26
 	<?php endif; ?>
27
-	<?php if((bool) !$_['isAdmin']): ?>
27
+	<?php if ((bool) !$_['isAdmin']): ?>
28 28
 		:
29
-		<?php if( $_['default_quota'] === 'none'): ?>
30
-			<?php p($l->t('Unlimited'));?>
29
+		<?php if ($_['default_quota'] === 'none'): ?>
30
+			<?php p($l->t('Unlimited')); ?>
31 31
 		<?php else: ?>
32
-			<?php p($_['default_quota']);?>
32
+			<?php p($_['default_quota']); ?>
33 33
 		<?php endif; ?>
34 34
 	<?php endif; ?>
35 35
 </div>
Please login to merge, or discard this patch.
settings/templates/users/part.createuser.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
 		<div class="groups"><div class="groupsListContainer multiselect button" data-placeholder="<?php p($l->t('Groups'))?>"><span class="title groupsList"></span><span class="icon-triangle-s"></span></div></div>
14 14
 		<input type="submit" class="button" value="<?php p($l->t('Create'))?>" />
15 15
 	</form>
16
-	<?php if((bool)$_['recoveryAdminEnabled']): ?>
16
+	<?php if ((bool) $_['recoveryAdminEnabled']): ?>
17 17
 	<div class="recoveryPassword">
18 18
 	<input id="recoveryPassword"
19 19
 		   type="password"
Please login to merge, or discard this patch.
settings/Controller/EncryptionController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 		} catch (\Exception $e) {
131 131
 			return [
132 132
 				'data' => [
133
-					'message' => (string)$this->l10n->t('A problem occurred, please check your log files (Error: %s)', [$e->getMessage()]),
133
+					'message' => (string) $this->l10n->t('A problem occurred, please check your log files (Error: %s)', [$e->getMessage()]),
134 134
 				],
135 135
 				'status' => 'error',
136 136
 			];
Please login to merge, or discard this patch.
settings/Controller/GroupsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,15 +100,15 @@  discard block
 block discarded – undo
100 100
 	 * @return DataResponse
101 101
 	 */
102 102
 	public function create($id) {
103
-		if($this->groupManager->groupExists($id)) {
103
+		if ($this->groupManager->groupExists($id)) {
104 104
 			return new DataResponse(
105 105
 				array(
106
-					'message' => (string)$this->l10n->t('Group already exists.')
106
+					'message' => (string) $this->l10n->t('Group already exists.')
107 107
 				),
108 108
 				Http::STATUS_CONFLICT
109 109
 			);
110 110
 		}
111
-		if($this->groupManager->createGroup($id)) {
111
+		if ($this->groupManager->createGroup($id)) {
112 112
 			return new DataResponse(
113 113
 				array(
114 114
 					'groupname' => $id
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 			array(
122 122
 				'status' => 'error',
123 123
 				'data' => array(
124
-					'message' => (string)$this->l10n->t('Unable to add group.')
124
+					'message' => (string) $this->l10n->t('Unable to add group.')
125 125
 				)
126 126
 			),
127 127
 			Http::STATUS_FORBIDDEN
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			array(
153 153
 				'status' => 'error',
154 154
 				'data' => array(
155
-					'message' => (string)$this->l10n->t('Unable to delete group.')
155
+					'message' => (string) $this->l10n->t('Unable to delete group.')
156 156
 				),
157 157
 			),
158 158
 			Http::STATUS_FORBIDDEN
Please login to merge, or discard this patch.
settings/Middleware/SubadminMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 	 * @throws \Exception
60 60
 	 */
61 61
 	public function beforeController($controller, $methodName) {
62
-		if(!$this->reflector->hasAnnotation('NoSubadminRequired')) {
63
-			if(!$this->isSubAdmin) {
62
+		if (!$this->reflector->hasAnnotation('NoSubadminRequired')) {
63
+			if (!$this->isSubAdmin) {
64 64
 				throw new NotAdminException('Logged in user must be a subadmin');
65 65
 			}
66 66
 		}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 * @throws \Exception
76 76
 	 */
77 77
 	public function afterException($controller, $methodName, \Exception $exception) {
78
-		if($exception instanceof NotAdminException) {
78
+		if ($exception instanceof NotAdminException) {
79 79
 			$response = new TemplateResponse('core', '403', array(), 'guest');
80 80
 			$response->setStatus(Http::STATUS_FORBIDDEN);
81 81
 			return $response;
Please login to merge, or discard this patch.