Passed
Push — master ( 1d8da4...323fe4 )
by Roeland
09:56 queued 10s
created
lib/private/legacy/template/functions.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
  * @param string $opts, additional optional options
47 47
 */
48 48
 function emit_css_tag($href, $opts = '') {
49
-	$s='<link rel="stylesheet"';
49
+	$s = '<link rel="stylesheet"';
50 50
 	if (!empty($href)) {
51
-		$s.=' href="' . $href .'"';
51
+		$s .= ' href="'.$href.'"';
52 52
 	}
53 53
 	if (!empty($opts)) {
54
-		$s.=' '.$opts;
54
+		$s .= ' '.$opts;
55 55
 	}
56 56
 	print_unescaped($s.">\n");
57 57
 }
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
  * @param array $obj all the script information from template
62 62
 */
63 63
 function emit_css_loading_tags($obj) {
64
-	foreach($obj['cssfiles'] as $css) {
64
+	foreach ($obj['cssfiles'] as $css) {
65 65
 		emit_css_tag($css);
66 66
 	}
67
-	foreach($obj['printcssfiles'] as $css) {
67
+	foreach ($obj['printcssfiles'] as $css) {
68 68
 		emit_css_tag($css, 'media="print"');
69 69
 	}
70 70
 }
@@ -74,20 +74,20 @@  discard block
 block discarded – undo
74 74
  * @param string $src the source URL, ignored when empty
75 75
  * @param string $script_content the inline script content, ignored when empty
76 76
 */
77
-function emit_script_tag($src, $script_content='') {
78
-	$defer_str=' defer';
79
-	$s='<script nonce="' . \OC::$server->getContentSecurityPolicyNonceManager()->getNonce() . '"';
77
+function emit_script_tag($src, $script_content = '') {
78
+	$defer_str = ' defer';
79
+	$s = '<script nonce="'.\OC::$server->getContentSecurityPolicyNonceManager()->getNonce().'"';
80 80
 	if (!empty($src)) {
81 81
 		 // emit script tag for deferred loading from $src
82
-		$s.=$defer_str.' src="' . $src .'">';
82
+		$s .= $defer_str.' src="'.$src.'">';
83 83
 	} else if (!empty($script_content)) {
84 84
 		// emit script tag for inline script from $script_content without defer (see MDN)
85
-		$s.=">\n".$script_content."\n";
85
+		$s .= ">\n".$script_content."\n";
86 86
 	} else {
87 87
 		// no $src nor $src_content, really useless empty tag
88
-		$s.='>';
88
+		$s .= '>';
89 89
 	}
90
-	$s.='</script>';
90
+	$s .= '</script>';
91 91
 	print_unescaped($s."\n");
92 92
 }
93 93
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
  * @param array $obj all the script information from template
97 97
 */
98 98
 function emit_script_loading_tags($obj) {
99
-	foreach($obj['jsfiles'] as $jsfile) {
99
+	foreach ($obj['jsfiles'] as $jsfile) {
100 100
 		emit_script_tag($jsfile, '');
101 101
 	}
102 102
 	if (!empty($obj['inline_ocjs'])) {
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
  * if an array is given it will add all scripts
121 121
  */
122 122
 function script($app, $file = null) {
123
-	if(is_array($file)) {
124
-		foreach($file as $f) {
123
+	if (is_array($file)) {
124
+		foreach ($file as $f) {
125 125
 			OC_Util::addScript($app, $f);
126 126
 		}
127 127
 	} else {
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
  * if an array is given it will add all scripts
137 137
  */
138 138
 function vendor_script($app, $file = null) {
139
-	if(is_array($file)) {
140
-		foreach($file as $f) {
139
+	if (is_array($file)) {
140
+		foreach ($file as $f) {
141 141
 			OC_Util::addVendorScript($app, $f);
142 142
 		}
143 143
 	} else {
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
  * if an array is given it will add all styles
153 153
  */
154 154
 function style($app, $file = null) {
155
-	if(is_array($file)) {
156
-		foreach($file as $f) {
155
+	if (is_array($file)) {
156
+		foreach ($file as $f) {
157 157
 			OC_Util::addStyle($app, $f);
158 158
 		}
159 159
 	} else {
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
  * if an array is given it will add all styles
169 169
  */
170 170
 function vendor_style($app, $file = null) {
171
-	if(is_array($file)) {
172
-		foreach($file as $f) {
171
+	if (is_array($file)) {
172
+		foreach ($file as $f) {
173 173
 			OC_Util::addVendorStyle($app, $f);
174 174
 		}
175 175
 	} else {
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
  * if an array is given it will add all components
194 194
  */
195 195
 function component($app, $file) {
196
-	if(is_array($file)) {
197
-		foreach($file as $f) {
198
-			$url = link_to($app, 'component/' . $f . '.html');
196
+	if (is_array($file)) {
197
+		foreach ($file as $f) {
198
+			$url = link_to($app, 'component/'.$f.'.html');
199 199
 			OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
200 200
 		}
201 201
 	} else {
202
-		$url = link_to($app, 'component/' . $file . '.html');
202
+		$url = link_to($app, 'component/'.$file.'.html');
203 203
 		OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
204 204
 	}
205 205
 }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
  *
214 214
  * For further information have a look at \OCP\IURLGenerator::linkTo
215 215
  */
216
-function link_to( $app, $file, $args = array() ) {
216
+function link_to($app, $file, $args = array()) {
217 217
 	return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
218 218
 }
219 219
 
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
  *
234 234
  * For further information have a look at \OCP\IURLGenerator::imagePath
235 235
  */
236
-function image_path( $app, $image ) {
237
-	return \OC::$server->getURLGenerator()->imagePath( $app, $image );
236
+function image_path($app, $image) {
237
+	return \OC::$server->getURLGenerator()->imagePath($app, $image);
238 238
 }
239 239
 
240 240
 /**
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
  * @param string $mimetype mimetype
243 243
  * @return string link to the image
244 244
  */
245
-function mimetype_icon( $mimetype ) {
246
-	return \OC::$server->getMimeTypeDetector()->mimeTypeIcon( $mimetype );
245
+function mimetype_icon($mimetype) {
246
+	return \OC::$server->getMimeTypeDetector()->mimeTypeIcon($mimetype);
247 247
 }
248 248
 
249 249
 /**
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
  * @param string $path path of file
253 253
  * @return string link to the preview
254 254
  */
255
-function preview_icon( $path ) {
255
+function preview_icon($path) {
256 256
 	return \OC::$server->getURLGenerator()->linkToRoute('core.Preview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path]);
257 257
 }
258 258
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
  * @param string $token
262 262
  * @return string
263 263
  */
264
-function publicPreview_icon ( $path, $token ) {
264
+function publicPreview_icon($path, $token) {
265 265
 	return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 'token' => $token]);
266 266
 }
267 267
 
@@ -272,8 +272,8 @@  discard block
 block discarded – undo
272 272
  *
273 273
  * For further information have a look at OC_Helper::humanFileSize
274 274
  */
275
-function human_file_size( $bytes ) {
276
-	return OC_Helper::humanFileSize( $bytes );
275
+function human_file_size($bytes) {
276
+	return OC_Helper::humanFileSize($bytes);
277 277
 }
278 278
 
279 279
 /**
@@ -281,10 +281,10 @@  discard block
 block discarded – undo
281 281
  * @param int $timestamp UNIX timestamp to strip
282 282
  * @return int timestamp without time value
283 283
  */
284
-function strip_time($timestamp){
284
+function strip_time($timestamp) {
285 285
 	$date = new \DateTime("@{$timestamp}");
286 286
 	$date->setTime(0, 0, 0);
287
-	return (int)$date->format('U');
287
+	return (int) $date->format('U');
288 288
 }
289 289
 
290 290
 /**
@@ -299,15 +299,15 @@  discard block
 block discarded – undo
299 299
 	/** @var \OC\DateTimeFormatter $formatter */
300 300
 	$formatter = \OC::$server->query('DateTimeFormatter');
301 301
 
302
-	if ($dateOnly){
302
+	if ($dateOnly) {
303 303
 		return $formatter->formatDateSpan($timestamp, $fromTime);
304 304
 	}
305 305
 	return $formatter->formatTimeSpan($timestamp, $fromTime);
306 306
 }
307 307
 
308
-function html_select_options($options, $selected, $params=array()) {
308
+function html_select_options($options, $selected, $params = array()) {
309 309
 	if (!is_array($selected)) {
310
-		$selected=array($selected);
310
+		$selected = array($selected);
311 311
 	}
312 312
 	if (isset($params['combine']) && $params['combine']) {
313 313
 		$options = array_combine($options, $options);
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 		$label_name = $params['label'];
321 321
 	}
322 322
 	$html = '';
323
-	foreach($options as $value => $label) {
323
+	foreach ($options as $value => $label) {
324 324
 		if ($value_name && is_array($label)) {
325 325
 			$value = $label[$value_name];
326 326
 		}
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 			$label = $label[$label_name];
329 329
 		}
330 330
 		$select = in_array($value, $selected) ? ' selected="selected"' : '';
331
-		$html .= '<option value="' . \OCP\Util::sanitizeHTML($value) . '"' . $select . '>' . \OCP\Util::sanitizeHTML($label) . '</option>'."\n";
331
+		$html .= '<option value="'.\OCP\Util::sanitizeHTML($value).'"'.$select.'>'.\OCP\Util::sanitizeHTML($label).'</option>'."\n";
332 332
 	}
333 333
 	return $html;
334 334
 }
Please login to merge, or discard this patch.
apps/provisioning_api/lib/Controller/AUserData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 		// Check if the target user exists
87 87
 		$targetUserObject = $this->userManager->get($userId);
88
-		if($targetUserObject === null) {
88
+		if ($targetUserObject === null) {
89 89
 			throw new OCSNotFoundException('User does not exist');
90 90
 		}
91 91
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	protected function getUserSubAdminGroupsData(string $userId): array {
138 138
 		$user = $this->userManager->get($userId);
139 139
 		// Check if the user exists
140
-		if($user === null) {
140
+		if ($user === null) {
141 141
 			throw new OCSNotFoundException('User does not exist');
142 142
 		}
143 143
 
Please login to merge, or discard this patch.
lib/private/Group/MetaData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 			IUserSession $userSession
64 64
 			) {
65 65
 		$this->user = $user;
66
-		$this->isAdmin = (bool)$isAdmin;
66
+		$this->isAdmin = (bool) $isAdmin;
67 67
 		$this->groupManager = $groupManager;
68 68
 		$this->userSession = $userSession;
69 69
 	}
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 	 * @return array
80 80
 	 */
81 81
 	public function get($groupSearch = '', $userSearch = '') {
82
-		$key = $groupSearch . '::' . $userSearch;
83
-		if(isset($this->metaData[$key])) {
82
+		$key = $groupSearch.'::'.$userSearch;
83
+		if (isset($this->metaData[$key])) {
84 84
 			return $this->metaData[$key];
85 85
 		}
86 86
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		$sortAdminGroupsIndex = 0;
92 92
 		$sortAdminGroupsKeys = array();
93 93
 
94
-		foreach($this->getGroups($groupSearch) as $group) {
94
+		foreach ($this->getGroups($groupSearch) as $group) {
95 95
 			$groupMetaData = $this->generateGroupMetaData($group, $userSearch);
96 96
 			if (strtolower($group->getGID()) !== 'admin') {
97 97
 				$this->addEntry(
@@ -189,11 +189,11 @@  discard block
 block discarded – undo
189 189
 	 * @return \OCP\IGroup[]
190 190
 	 */
191 191
 	public function getGroups($search = '') {
192
-		if($this->isAdmin) {
192
+		if ($this->isAdmin) {
193 193
 			return $this->groupManager->search($search);
194 194
 		} else {
195 195
 			$userObject = $this->userSession->getUser();
196
-			if($userObject !== null) {
196
+			if ($userObject !== null) {
197 197
 				$groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($userObject);
198 198
 			} else {
199 199
 				$groups = [];
Please login to merge, or discard this patch.
apps/dav/lib/Command/RemoveInvalidShares.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 			->from('dav_shares')
77 77
 			->execute();
78 78
 
79
-		while($row = $result->fetch()) {
79
+		while ($row = $result->fetch()) {
80 80
 			$principaluri = $row['principaluri'];
81 81
 			$p = $this->principalBackend->getPrincipalByPath($principaluri);
82 82
 			if ($p === null) {
Please login to merge, or discard this patch.
lib/private/Authentication/Token/PublicKeyTokenMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 		$data = $result->fetchAll();
130 130
 		$result->closeCursor();
131 131
 
132
-		$entities = array_map(function ($row) {
132
+		$entities = array_map(function($row) {
133 133
 			return PublicKeyToken::fromRow($row);
134 134
 		}, $data);
135 135
 
Please login to merge, or discard this patch.
lib/public/Federation/Exceptions/BadRequestException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 		$l = \OC::$server->getL10N('federation');
37 37
 		$this->parameterList = $missingParameters;
38 38
 		$parameterList = implode(',', $missingParameters);
39
-		$message = 'Parameters missing in order to complete the request. Missing Parameters: ' . $parameterList;
39
+		$message = 'Parameters missing in order to complete the request. Missing Parameters: '.$parameterList;
40 40
 		$hint = $l->t('Parameters missing in order to complete the request. Missing Parameters: "%s"', [$parameterList]);
41 41
 		parent::__construct($message, $hint);
42 42
 	}
Please login to merge, or discard this patch.
apps/files/templates/simplelist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
18 18
 		<tr>
19 19
 			<th id='headerName' class="hidden column-name">
20 20
 				<div id="headerName-container">
21
-					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
21
+					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
22 22
 				</div>
23 23
 			</th>
24 24
 			<th id="headerSize" class="hidden column-size">
25 25
 				<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
26 26
 			</th>
27 27
 			<th id="headerDate" class="hidden column-mtime">
28
-				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a>
28
+				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
29 29
 				<span class="selectedActions">
30 30
 				    <a href="" class="delete-selected">
31 31
 					<img class="svg" alt=""
Please login to merge, or discard this patch.
apps/files_trashbin/templates/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			</th>
30 30
 			<th id='headerName' class="hidden column-name">
31 31
 				<div id="headerName-container">
32
-					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
32
+					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
33 33
 					<span id="selectedActionsList" class='selectedActions'>
34 34
 						<a href="" class="actions-selected">
35 35
 							<span class="icon icon-more"></span>
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 				</div>
40 40
 			</th>
41 41
 			<th id="headerDate" class="hidden column-mtime">
42
-				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Deleted' )); ?></span><span class="sort-indicator"></span></a>
42
+				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Deleted')); ?></span><span class="sort-indicator"></span></a>
43 43
 			</th>
44 44
 		</tr>
45 45
 	</thead>
Please login to merge, or discard this patch.
lib/private/Files/ObjectStore/Azure.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 	private function getBlobClient() {
60 60
 		if (!$this->blobClient) {
61 61
 			$protocol = $this->endpoint ? substr($this->endpoint, 0, strpos($this->endpoint, ':')) : 'https';
62
-			$connectionString = "DefaultEndpointsProtocol=" . $protocol . ";AccountName=" . $this->accountName . ";AccountKey=" . $this->accountKey;
62
+			$connectionString = "DefaultEndpointsProtocol=".$protocol.";AccountName=".$this->accountName.";AccountKey=".$this->accountKey;
63 63
 			if ($this->endpoint) {
64
-				$connectionString .= ';BlobEndpoint=' . $this->endpoint;
64
+				$connectionString .= ';BlobEndpoint='.$this->endpoint;
65 65
 			}
66 66
 			$this->blobClient = BlobRestProxy::createBlobService($connectionString);
67 67
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @return string the container or bucket name where objects are stored
77 77
 	 */
78 78
 	public function getStorageId() {
79
-		return 'azure::blob::' . $this->containerName;
79
+		return 'azure::blob::'.$this->containerName;
80 80
 	}
81 81
 
82 82
 	/**
Please login to merge, or discard this patch.