Passed
Push — master ( 27f492...c31d31 )
by Roeland
16:19
created
lib/private/Share/Helper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
 			$params = array();
94 94
 			if (count($ids) == 1 && isset($uidOwner)) {
95 95
 				// FIXME: don't concat $parents, use Docrine's PARAM_INT_ARRAY approach
96
-				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' .
97
-					'`item_target`, `file_target`, `parent` ' .
98
-					'FROM `*PREFIX*share` ' .
96
+				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '.
97
+					'`item_target`, `file_target`, `parent` '.
98
+					'FROM `*PREFIX*share` '.
99 99
 					'WHERE `parent` IN ('.$parents.') AND `uid_owner` = ? ';
100 100
 				$params[] = $uidOwner;
101 101
 			} else {
102
-				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' .
103
-					'`item_target`, `file_target`, `parent`, `uid_owner` ' .
102
+				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '.
103
+					'`item_target`, `file_target`, `parent`, `uid_owner` '.
104 104
 					'FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.') ';
105 105
 			}
106 106
 			if ($excludeGroupChildren) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 					'shareWith' => $item['share_with'],
118 118
 					'itemTarget' => $item['item_target'],
119 119
 					'itemType' => $item['item_type'],
120
-					'shareType' => (int)$item['share_type'],
120
+					'shareType' => (int) $item['share_type'],
121 121
 				);
122 122
 				if (isset($item['file_target'])) {
123 123
 					$tmpItem['fileTarget'] = $item['file_target'];
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		if ($defaultExpireDate === 'yes') {
169 169
 			$enforceExpireDate = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
170 170
 			$defaultExpireSettings['defaultExpireDateSet'] = true;
171
-			$defaultExpireSettings['expireAfterDays'] = (int)$config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
171
+			$defaultExpireSettings['expireAfterDays'] = (int) $config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
172 172
 			$defaultExpireSettings['enforceExpireDate'] = $enforceExpireDate === 'yes';
173 173
 		}
174 174
 
Please login to merge, or discard this patch.
core/templates/layout.guest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@
 block discarded – undo
18 18
 		<?php emit_script_loading_tags($_); ?>
19 19
 		<?php print_unescaped($_['headers']); ?>
20 20
 	</head>
21
-	<body id="<?php p($_['bodyid']);?>">
21
+	<body id="<?php p($_['bodyid']); ?>">
22 22
 		<?php include 'layout.noscript.warning.php'; ?>
23 23
 		<div class="wrapper">
24 24
 			<div class="v-align">
25
-				<?php if ($_['bodyid'] === 'body-login' ): ?>
25
+				<?php if ($_['bodyid'] === 'body-login'): ?>
26 26
 					<header role="banner">
27 27
 						<div id="header">
28 28
 							<div class="logo">
29 29
 								<h1 class="hidden-visually">
30 30
 									<?php p($theme->getName()); ?>
31 31
 								</h1>
32
-								<?php if(\OC::$server->getConfig()->getSystemValue('installed', false)
32
+								<?php if (\OC::$server->getConfig()->getSystemValue('installed', false)
33 33
 									&& \OC::$server->getConfig()->getAppValue('theming', 'logoMime', false)): ?>
34 34
 									<img src="<?php p($theme->getLogo()); ?>"/>
35 35
 								<?php endif; ?>
Please login to merge, or discard this patch.
lib/public/Settings/IManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	/**
37 37
 	 * @since 9.1.0
38 38
 	 */
39
-	const KEY_ADMIN_SECTION  = 'admin-section';
39
+	const KEY_ADMIN_SECTION = 'admin-section';
40 40
 
41 41
 	/**
42 42
 	 * @since 13.0.0
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	/**
47 47
 	 * @since 13.0.0
48 48
 	 */
49
-	const KEY_PERSONAL_SECTION  = 'personal-section';
49
+	const KEY_PERSONAL_SECTION = 'personal-section';
50 50
 
51 51
 	/**
52 52
 	 * @param string $type 'admin' or 'personal'
Please login to merge, or discard this patch.
lib/public/App.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 	 * @since 4.0.0
54 54
 	 * @deprecated 14.0.0 Use settings section in appinfo.xml to register personal admin sections
55 55
 	*/
56
-	public static function registerPersonal( $app, $page ) {
57
-		\OC_App::registerPersonal( $app, $page );
56
+	public static function registerPersonal($app, $page) {
57
+		\OC_App::registerPersonal($app, $page);
58 58
 	}
59 59
 
60 60
 	/**
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	 * @since 4.0.0
66 66
 	 * @deprecated 14.0.0 Use settings section in appinfo.xml to register admin sections
67 67
 	 */
68
-	public static function registerAdmin( $app, $page ) {
69
-		\OC_App::registerAdmin( $app, $page );
68
+	public static function registerAdmin($app, $page) {
69
+		\OC_App::registerAdmin($app, $page);
70 70
 	}
71 71
 
72 72
 	/**
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	 * @deprecated 14.0.0 ise \OC::$server->getAppManager()->getAppInfo($appId)
78 78
 	 * @since 4.0.0
79 79
 	*/
80
-	public static function getAppInfo( $app, $path=false ) {
81
-		return \OC_App::getAppInfo( $app, $path);
80
+	public static function getAppInfo($app, $path = false) {
81
+		return \OC_App::getAppInfo($app, $path);
82 82
 	}
83 83
 
84 84
 	/**
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 	 * @since 4.0.0
91 91
 	 * @deprecated 13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId)
92 92
 	 */
93
-	public static function isEnabled( $app ) {
94
-		return \OC::$server->getAppManager()->isEnabledForUser( $app );
93
+	public static function isEnabled($app) {
94
+		return \OC::$server->getAppManager()->isEnabledForUser($app);
95 95
 	}
96 96
 
97 97
 	/**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @since 4.0.0
102 102
 	 * @deprecated 9.0.0 ownCloud core will handle disabled apps and redirects to valid URLs
103 103
 	*/
104
-	public static function checkAppEnabled( $app ) {
104
+	public static function checkAppEnabled($app) {
105 105
 	}
106 106
 
107 107
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @since 4.0.0
112 112
 	 * @deprecated 14.0.0 use \OC::$server->getAppManager()->getAppVersion($appId)
113 113
 	 */
114
-	public static function getAppVersion( $app ) {
114
+	public static function getAppVersion($app) {
115 115
 		return \OC::$server->getAppManager()->getAppVersion($app);
116 116
 	}
117 117
 }
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/FilesPlugin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		$this->server->on('propPatch', array($this, 'handleUpdateProperties'));
169 169
 		$this->server->on('afterBind', array($this, 'sendFileIdHeader'));
170 170
 		$this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
171
-		$this->server->on('afterMethod:GET', [$this,'httpGet']);
171
+		$this->server->on('afterMethod:GET', [$this, 'httpGet']);
172 172
 		$this->server->on('afterMethod:GET', array($this, 'handleDownloadToken'));
173 173
 		$this->server->on('afterResponse', function($request, ResponseInterface $response) {
174 174
 			$body = $response->getBody();
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
 		if ($sourceDir !== $destinationDir) {
199 199
 			$sourceNodeFileInfo = $sourceNode->getFileInfo();
200 200
 			if ($sourceNodeFileInfo === null) {
201
-				throw new NotFound($source . ' does not exist');
201
+				throw new NotFound($source.' does not exist');
202 202
  			}
203 203
 
204 204
 			if (!$sourceNodeFileInfo->isDeletable()) {
205
-				throw new Forbidden($source . " cannot be deleted");
205
+				throw new Forbidden($source." cannot be deleted");
206 206
 			}
207 207
 		}
208 208
 	}
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 					Request::USER_AGENT_ANDROID_MOBILE_CHROME,
256 256
 					Request::USER_AGENT_FREEBOX,
257 257
 				])) {
258
-				$response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"');
258
+				$response->addHeader('Content-Disposition', 'attachment; filename="'.rawurlencode($filename).'"');
259 259
 			} else {
260
-				$response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename)
261
-													 . '; filename="' . rawurlencode($filename) . '"');
260
+				$response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\''.rawurlencode($filename)
261
+													 . '; filename="'.rawurlencode($filename).'"');
262 262
 			}
263 263
 		}
264 264
 
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
 				}
340 340
 			});
341 341
 
342
-			$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
342
+			$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function() use ($node) {
343 343
 				return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
344 344
 			});
345 345
 			$propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
346 346
 				return $node->getSize();
347 347
 			});
348
-			$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) {
348
+			$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function() use ($node) {
349 349
 				return $node->getFileInfo()->getMountPoint()->getMountType();
350 350
 			});
351 351
 		}
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 			list($path, $name) = \Sabre\Uri\split($filePath);
438 438
 			$info = \OC_FileChunking::decodeName($name);
439 439
 			if (!empty($info)) {
440
-				$filePath = $path . '/' . $info['name'];
440
+				$filePath = $path.'/'.$info['name'];
441 441
 			}
442 442
 		}
443 443
 
Please login to merge, or discard this patch.
lib/private/Streamer.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 class Streamer {
32 32
 	// array of regexp. Matching user agents will get tar instead of zip
33
-	private $preferTarFor = [ '/macintosh|mac os x/i' ];
33
+	private $preferTarFor = ['/macintosh|mac os x/i'];
34 34
 
35 35
 	// streamer instance
36 36
 	private $streamerInstance;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @param int $numberOfFiles The number of files (and directories) that will
44 44
 	 *        be included in the streamed file
45 45
 	 */
46
-	public function __construct(IRequest $request, int $size, int $numberOfFiles){
46
+	public function __construct(IRequest $request, int $size, int $numberOfFiles) {
47 47
 
48 48
 		/**
49 49
 		 * zip32 constraints for a basic (without compression, volumes nor
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 * Send HTTP headers
81 81
 	 * @param string $name 
82 82
 	 */
83
-	public function sendHeaders($name){
83
+	public function sendHeaders($name) {
84 84
 		$extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar';
85
-		$fullName = $name . $extension;
85
+		$fullName = $name.$extension;
86 86
 		$this->streamerInstance->sendHeaders($fullName);
87 87
 	}
88 88
 	
@@ -91,27 +91,27 @@  discard block
 block discarded – undo
91 91
 	 * @param string $dir
92 92
 	 * @param string $internalDir
93 93
 	 */
94
-	public function addDirRecursive($dir, $internalDir='') {
94
+	public function addDirRecursive($dir, $internalDir = '') {
95 95
 		$dirname = basename($dir);
96
-		$rootDir = $internalDir . $dirname;
96
+		$rootDir = $internalDir.$dirname;
97 97
 		if (!empty($rootDir)) {
98 98
 			$this->streamerInstance->addEmptyDir($rootDir);
99 99
 		}
100
-		$internalDir .= $dirname . '/';
100
+		$internalDir .= $dirname.'/';
101 101
 		// prevent absolute dirs
102 102
 		$internalDir = ltrim($internalDir, '/');
103 103
 
104
-		$files= \OC\Files\Filesystem::getDirectoryContent($dir);
105
-		foreach($files as $file) {
104
+		$files = \OC\Files\Filesystem::getDirectoryContent($dir);
105
+		foreach ($files as $file) {
106 106
 			$filename = $file['name'];
107
-			$file = $dir . '/' . $filename;
108
-			if(\OC\Files\Filesystem::is_file($file)) {
107
+			$file = $dir.'/'.$filename;
108
+			if (\OC\Files\Filesystem::is_file($file)) {
109 109
 				$filesize = \OC\Files\Filesystem::filesize($file);
110 110
 				$fileTime = \OC\Files\Filesystem::filemtime($file);
111 111
 				$fh = \OC\Files\Filesystem::fopen($file, 'r');
112
-				$this->addFileFromStream($fh, $internalDir . $filename, $filesize, $fileTime);
112
+				$this->addFileFromStream($fh, $internalDir.$filename, $filesize, $fileTime);
113 113
 				fclose($fh);
114
-			}elseif(\OC\Files\Filesystem::is_dir($file)) {
114
+			}elseif (\OC\Files\Filesystem::is_dir($file)) {
115 115
 				$this->addDirRecursive($file, $internalDir);
116 116
 			}
117 117
 		}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 * @param string $dirName Directory Path and name to be added to the archive.
148 148
 	 * @return bool $success
149 149
 	 */
150
-	public function addEmptyDir($dirName){
150
+	public function addEmptyDir($dirName) {
151 151
 		return $this->streamerInstance->addEmptyDir($dirName);
152 152
 	}
153 153
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * closing, the file is completely written to the output stream.
158 158
 	 * @return bool $success
159 159
 	 */
160
-	public function finalize(){
160
+	public function finalize() {
161 161
 		return $this->streamerInstance->finalize();
162 162
 	}
163 163
 }
Please login to merge, or discard this patch.
apps/dav/lib/Files/FileSearchBackend.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 		$results = $folder->search($query);
159 159
 
160 160
 		/** @var SearchResult[] $nodes */
161
-		$nodes = array_map(function (Node $node) {
161
+		$nodes = array_map(function(Node $node) {
162 162
 			if ($node instanceof Folder) {
163 163
 				$davNode = new \OCA\DAV\Connector\Sabre\Directory($this->view, $node, $this->tree, $this->shareManager);
164 164
 			} else {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		}, $results);
171 171
 
172 172
 		// Sort again, since the result from multiple storages is appended and not sorted
173
-		usort($nodes, function (SearchResult $a, SearchResult $b) use ($search) {
173
+		usort($nodes, function(SearchResult $a, SearchResult $b) use ($search) {
174 174
 			return $this->sort($a, $b, $search->orderBy);
175 175
 		});
176 176
 
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
 	 * @return string
260 260
 	 */
261 261
 	private function getHrefForNode(Node $node) {
262
-		$base = '/files/' . $this->user->getUID();
263
-		return $base . $this->view->getRelativePath($node->getPath());
262
+		$base = '/files/'.$this->user->getUID();
263
+		return $base.$this->view->getRelativePath($node->getPath());
264 264
 	}
265 265
 
266 266
 	/**
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 		// TODO offset
272 272
 		$limit = $query->limit;
273 273
 		$orders = array_map([$this, 'mapSearchOrder'], $query->orderBy);
274
-		return new SearchQuery($this->transformSearchOperation($query->where), (int)$limit->maxResults, 0, $orders, $this->user);
274
+		return new SearchQuery($this->transformSearchOperation($query->where), (int) $limit->maxResults, 0, $orders, $this->user);
275 275
 	}
276 276
 
277 277
 	/**
@@ -301,19 +301,19 @@  discard block
 block discarded – undo
301 301
 			case Operator::OPERATION_LESS_THAN:
302 302
 			case Operator::OPERATION_IS_LIKE:
303 303
 				if (count($operator->arguments) !== 2) {
304
-					throw new \InvalidArgumentException('Invalid number of arguments for ' . $trimmedType . ' operation');
304
+					throw new \InvalidArgumentException('Invalid number of arguments for '.$trimmedType.' operation');
305 305
 				}
306 306
 				if (!($operator->arguments[0] instanceof SearchPropertyDefinition)) {
307
-					throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property');
307
+					throw new \InvalidArgumentException('Invalid argument 1 for '.$trimmedType.' operation, expected property');
308 308
 				}
309 309
 				if (!($operator->arguments[1] instanceof Literal)) {
310
-					throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal');
310
+					throw new \InvalidArgumentException('Invalid argument 2 for '.$trimmedType.' operation, expected literal');
311 311
 				}
312 312
 				return new SearchComparison($trimmedType, $this->mapPropertyNameToColumn($operator->arguments[0]), $this->castValue($operator->arguments[0], $operator->arguments[1]->value));
313 313
 			case Operator::OPERATION_IS_COLLECTION:
314 314
 				return new SearchComparison('eq', 'mimetype', ICacheEntry::DIRECTORY_MIMETYPE);
315 315
 			default:
316
-				throw new \InvalidArgumentException('Unsupported operation ' . $trimmedType . ' (' . $operator->type . ')');
316
+				throw new \InvalidArgumentException('Unsupported operation '.$trimmedType.' ('.$operator->type.')');
317 317
 		}
318 318
 	}
319 319
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 			case FilesPlugin::INTERNAL_FILEID_PROPERTYNAME:
339 339
 				return 'fileid';
340 340
 			default:
341
-				throw new \InvalidArgumentException('Unsupported property for search or order: ' . $property->name);
341
+				throw new \InvalidArgumentException('Unsupported property for search or order: '.$property->name);
342 342
 		}
343 343
 	}
344 344
 
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/Template/SimpleMenuAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
 	 * @since 14.0.0
165 165
 	 */
166 166
 	public function render(): string {
167
-		$detailContent = ($this->detail !== '') ? '&nbsp;<span class="download-size">(' . Util::sanitizeHTML($this->detail) . ')</span>' : '';
167
+		$detailContent = ($this->detail !== '') ? '&nbsp;<span class="download-size">('.Util::sanitizeHTML($this->detail).')</span>' : '';
168 168
 		return sprintf(
169 169
 			'<li id="%s"><a href="%s"><span class="icon %s"></span>%s %s</a></li>',
170 170
 			Util::sanitizeHTML($this->id), Util::sanitizeHTML($this->link), Util::sanitizeHTML($this->icon), Util::sanitizeHTML($this->label), $detailContent
Please login to merge, or discard this patch.
apps/files/lib/Activity/Provider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 
115 115
 	protected function setIcon(IEvent $event, $icon) {
116 116
 		if ($this->activityManager->getRequirePNG()) {
117
-			$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.png')));
117
+			$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon.'.png')));
118 118
 		} else {
119
-			$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.svg')));
119
+			$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon.'.svg')));
120 120
 		}
121 121
 	}
122 122
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		}
233 233
 
234 234
 		if ($this->fileIsEncrypted) {
235
-			$event->setSubject($event->getSubject() . '_enc', $event->getSubjectParameters());
235
+			$event->setSubject($event->getSubject().'_enc', $event->getSubjectParameters());
236 236
 		}
237 237
 
238 238
 		if (!isset($parsedParameters['user'])) {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	protected function setSubjects(IEvent $event, $subject, array $parameters) {
256 256
 		$placeholders = $replacements = [];
257 257
 		foreach ($parameters as $placeholder => $parameter) {
258
-			$placeholders[] = '{' . $placeholder . '}';
258
+			$placeholders[] = '{'.$placeholder.'}';
259 259
 			if ($parameter['type'] === 'file') {
260 260
 				$replacements[] = $parameter['path'];
261 261
 			} else {
Please login to merge, or discard this patch.