Passed
Push — master ( 323b2c...867dea )
by Roeland
10:13 queued 12s
created
lib/public/Federation/Exceptions/ActionNotSupportedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	 */
32 32
 	public function __construct($action) {
33 33
 		$l = \OC::$server->getL10N('federation');
34
-		$message = 'Action "' . $action . '" not supported or implemented.';
34
+		$message = 'Action "'.$action.'" not supported or implemented.';
35 35
 		$hint = $l->t('Action "%s" not supported or implemented.', [$action]);
36 36
 		parent::__construct($message, $hint);
37 37
 	}
Please login to merge, or discard this patch.
lib/private/Preview/Watcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 		}
56 56
 
57 57
 		try {
58
-			$folder = $this->appData->getFolder((string)$node->getId());
58
+			$folder = $this->appData->getFolder((string) $node->getId());
59 59
 			$folder->delete();
60 60
 		} catch (NotFoundException $e) {
61 61
 			//Nothing to do
Please login to merge, or discard this patch.
lib/private/Preview/WatcherConnector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 	public function connectWatcher() {
58 58
 		// Do not connect if we are not setup yet!
59 59
 		if ($this->config->getValue('instanceid', null) !== null) {
60
-			$this->root->listen('\OC\Files', 'postWrite', function (Node $node) {
60
+			$this->root->listen('\OC\Files', 'postWrite', function(Node $node) {
61 61
 				$this->getWatcher()->postWrite($node);
62 62
 			});
63 63
 
Please login to merge, or discard this patch.
lib/private/Authentication/Token/DefaultToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
 		if (\is_array($scope)) {
163 163
 			parent::setScope(json_encode($scope));
164 164
 		} else {
165
-			parent::setScope((string)$scope);
165
+			parent::setScope((string) $scope);
166 166
 		}
167 167
 	}
168 168
 
Please login to merge, or discard this patch.
lib/private/LargeFileHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	*                           PHP platform.
51 51
 	*/
52 52
 	public function __construct() {
53
-		$pow_2_53 = (float)self::POW_2_53_MINUS_1 + 1.0;
53
+		$pow_2_53 = (float) self::POW_2_53_MINUS_1 + 1.0;
54 54
 		if ($this->formatUnsignedInteger($pow_2_53) !== self::POW_2_53) {
55 55
 			throw new \RuntimeException(
56 56
 				'This class assumes floats to be double precision or "better".'
@@ -188,13 +188,13 @@  discard block
 block discarded – undo
188 188
 		try {
189 189
 			$result = filemtime($fullPath);
190 190
 		} catch (\Exception $e) {
191
-			$result =- 1;
191
+			$result = - 1;
192 192
 		}
193 193
 		if ($result < 0) {
194 194
 			if (\OC_Helper::is_function_enabled('exec')) {
195 195
 				$os = strtolower(php_uname('s'));
196 196
 				if (strpos($os, 'linux') !== false) {
197
-					return $this->exec('stat -c %Y ' . escapeshellarg($fullPath));
197
+					return $this->exec('stat -c %Y '.escapeshellarg($fullPath));
198 198
 				}
199 199
 			}
200 200
 		}
Please login to merge, or discard this patch.
apps/oauth2/lib/Controller/LoginRedirectorController.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
 
72 72
 		if ($response_type !== 'code') {
73 73
 			//Fail
74
-			$url = $client->getRedirectUri() . '?error=unsupported_response_type&state=' . $state;
74
+			$url = $client->getRedirectUri().'?error=unsupported_response_type&state='.$state;
75 75
 			return new RedirectResponse($url);
76 76
 		}
77 77
 
Please login to merge, or discard this patch.
apps/oauth2/lib/Controller/OauthApiController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 		}
99 99
 
100 100
 		// We handle the initial and refresh tokens the same way
101
-		if ($grant_type === 'refresh_token' ) {
101
+		if ($grant_type === 'refresh_token') {
102 102
 			$code = $refresh_token;
103 103
 		}
104 104
 
Please login to merge, or discard this patch.
apps/oauth2/lib/Migration/SetTokenExpiration.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
 		$cursor = $qb->execute();
63 63
 
64
-		while($row = $cursor->fetch()) {
64
+		while ($row = $cursor->fetch()) {
65 65
 			$token = AccessToken::fromRow($row);
66 66
 			try {
67 67
 				$appToken = $this->tokenProvider->getTokenById($token->getTokenId());
Please login to merge, or discard this patch.
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.