Passed
Push — master ( 32f79c...03cdff )
by Roeland
10:27 queued 11s
created
lib/private/Collaboration/Resources/Manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			->setFirstResult($start);
145 145
 
146 146
 		if ($filter !== '') {
147
-			$query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($filter) . '%')));
147
+			$query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%'.$this->connection->escapeLikeParameter($filter).'%')));
148 148
 		}
149 149
 
150 150
 		$result = $query->execute();
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		while ($row = $result->fetch()) {
155 155
 			$foundResults++;
156 156
 			$access = $row['access'] === null ? null : (bool) $row['access'];
157
-			$collection = new Collection($this, $this->connection, (int)$row['id'], (string)$row['name'], $user, $access);
157
+			$collection = new Collection($this, $this->connection, (int) $row['id'], (string) $row['name'], $user, $access);
158 158
 			if ($collection->canAccess($user)) {
159 159
 				$collections[] = $collection;
160 160
 			}
Please login to merge, or discard this patch.
lib/private/App/AppStore/Fetcher/AppFetcher.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 		$allowPreReleases = $this->getChannel() === 'beta' || $this->getChannel() === 'daily';
87 87
 		$allowNightly = $this->getChannel() === 'daily';
88 88
 
89
-		foreach($response['data'] as $dataKey => $app) {
89
+		foreach ($response['data'] as $dataKey => $app) {
90 90
 			$releases = [];
91 91
 
92 92
 			// Filter all compatible releases
93
-			foreach($app['releases'] as $release) {
93
+			foreach ($app['releases'] as $release) {
94 94
 				// Exclude all nightly and pre-releases if required
95 95
 				if (($allowNightly || $release['isNightly'] === false)
96 96
 					&& ($allowPreReleases || strpos($release['version'], '-') === false)) {
@@ -120,15 +120,15 @@  discard block
 block discarded – undo
120 120
 
121 121
 			// Get the highest version
122 122
 			$versions = [];
123
-			foreach($releases as $release) {
123
+			foreach ($releases as $release) {
124 124
 				$versions[] = $release['version'];
125 125
 			}
126 126
 			usort($versions, 'version_compare');
127 127
 			$versions = array_reverse($versions);
128
-			if(isset($versions[0])) {
128
+			if (isset($versions[0])) {
129 129
 				$highestVersion = $versions[0];
130 130
 				foreach ($releases as $release) {
131
-					if ((string)$release['version'] === (string)$highestVersion) {
131
+					if ((string) $release['version'] === (string) $highestVersion) {
132 132
 						$response['data'][$dataKey]['releases'] = [$release];
133 133
 						break;
134 134
 					}
Please login to merge, or discard this patch.
lib/private/User/User.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$this->backend = $backend;
84 84
 		$this->dispatcher = $dispatcher;
85 85
 		$this->emitter = $emitter;
86
-		if(is_null($config)) {
86
+		if (is_null($config)) {
87 87
 			$config = \OC::$server->getConfig();
88 88
 		}
89 89
 		$this->config = $config;
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function setEMailAddress($mailAddress) {
160 160
 		$oldMailAddress = $this->getEMailAddress();
161
-		if($oldMailAddress !== $mailAddress) {
162
-			if($mailAddress === '') {
161
+		if ($oldMailAddress !== $mailAddress) {
162
+			if ($mailAddress === '') {
163 163
 				$this->config->deleteUserValue($this->uid, 'settings', 'email');
164 164
 			} else {
165 165
 				$this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	 * @return bool
197 197
 	 */
198 198
 	public function delete() {
199
-		$this->dispatcher->dispatch(IUser::class . '::preDelete', new GenericEvent($this));
199
+		$this->dispatcher->dispatch(IUser::class.'::preDelete', new GenericEvent($this));
200 200
 		if ($this->emitter) {
201 201
 			$this->emitter->emit('\OC\User', 'preDelete', array($this));
202 202
 		}
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 			}
229 229
 
230 230
 			// Delete the users entry in the storage table
231
-			Storage::remove('home::' . $this->uid);
231
+			Storage::remove('home::'.$this->uid);
232 232
 
233 233
 			\OC::$server->getCommentsManager()->deleteReferencesOfActor('users', $this->uid);
234 234
 			\OC::$server->getCommentsManager()->deleteReadMarksFromUser($this);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 			$accountManager = \OC::$server->query(AccountManager::class);
242 242
 			$accountManager->deleteUser($this);
243 243
 
244
-			$this->dispatcher->dispatch(IUser::class . '::postDelete', new GenericEvent($this));
244
+			$this->dispatcher->dispatch(IUser::class.'::postDelete', new GenericEvent($this));
245 245
 			if ($this->emitter) {
246 246
 				$this->emitter->emit('\OC\User', 'postDelete', array($this));
247 247
 			}
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * @return bool
258 258
 	 */
259 259
 	public function setPassword($password, $recoveryPassword = null) {
260
-		$this->dispatcher->dispatch(IUser::class . '::preSetPassword', new GenericEvent($this, [
260
+		$this->dispatcher->dispatch(IUser::class.'::preSetPassword', new GenericEvent($this, [
261 261
 			'password' => $password,
262 262
 			'recoveryPassword' => $recoveryPassword,
263 263
 		]));
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		}
267 267
 		if ($this->backend->implementsActions(Backend::SET_PASSWORD)) {
268 268
 			$result = $this->backend->setPassword($this->uid, $password);
269
-			$this->dispatcher->dispatch(IUser::class . '::postSetPassword', new GenericEvent($this, [
269
+			$this->dispatcher->dispatch(IUser::class.'::postSetPassword', new GenericEvent($this, [
270 270
 				'password' => $password,
271 271
 				'recoveryPassword' => $recoveryPassword,
272 272
 			]));
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
 			if ($this->backend->implementsActions(Backend::GET_HOME) and $home = $this->backend->getHome($this->uid)) {
290 290
 				$this->home = $home;
291 291
 			} elseif ($this->config) {
292
-				$this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $this->uid;
292
+				$this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/'.$this->uid;
293 293
 			} else {
294
-				$this->home = \OC::$SERVERROOT . '/data/' . $this->uid;
294
+				$this->home = \OC::$SERVERROOT.'/data/'.$this->uid;
295 295
 			}
296 296
 		}
297 297
 		return $this->home;
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	 * @return string
304 304
 	 */
305 305
 	public function getBackendClassName() {
306
-		if($this->backend instanceof IUserBackend) {
306
+		if ($this->backend instanceof IUserBackend) {
307 307
 			return $this->backend->getBackendName();
308 308
 		}
309 309
 		return get_class($this->backend);
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 	 */
389 389
 	public function getQuota() {
390 390
 		$quota = $this->config->getUserValue($this->uid, 'files', 'quota', 'default');
391
-		if($quota === 'default') {
391
+		if ($quota === 'default') {
392 392
 			$quota = $this->config->getAppValue('files', 'default_quota', 'none');
393 393
 		}
394 394
 		return $quota;
@@ -403,11 +403,11 @@  discard block
 block discarded – undo
403 403
 	 */
404 404
 	public function setQuota($quota) {
405 405
 		$oldQuota = $this->config->getUserValue($this->uid, 'files', 'quota', '');
406
-		if($quota !== 'none' and $quota !== 'default') {
406
+		if ($quota !== 'none' and $quota !== 'default') {
407 407
 			$quota = OC_Helper::computerFileSize($quota);
408 408
 			$quota = OC_Helper::humanFileSize($quota);
409 409
 		}
410
-		if($quota !== $oldQuota) {
410
+		if ($quota !== $oldQuota) {
411 411
 			$this->config->setUserValue($this->uid, 'files', 'quota', $quota);
412 412
 			$this->triggerChange('quota', $quota, $oldQuota);
413 413
 		}
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 	public function getCloudId() {
445 445
 		$uid = $this->getUID();
446 446
 		$server = $this->urlGenerator->getAbsoluteURL('/');
447
-		$server =  rtrim( $this->removeProtocolFromUrl($server), '/');
447
+		$server = rtrim($this->removeProtocolFromUrl($server), '/');
448 448
 		return \OC::$server->getCloudIdManager()->getCloudId($uid, $server)->getId();
449 449
 	}
450 450
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 	}
464 464
 
465 465
 	public function triggerChange($feature, $value = null, $oldValue = null) {
466
-		$this->dispatcher->dispatch(IUser::class . '::changeUser', new GenericEvent($this, [
466
+		$this->dispatcher->dispatch(IUser::class.'::changeUser', new GenericEvent($this, [
467 467
 			'feature' => $feature,
468 468
 			'value' => $value,
469 469
 			'oldValue' => $oldValue,
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/OCSResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
 	 * @deprecated 9.2.0 To implement an OCS endpoint extend the OCSController
58 58
 	 */
59 59
 	public function __construct($format, $statuscode, $message,
60
-								$data=[], $itemscount='',
61
-								$itemsperpage='') {
60
+								$data = [], $itemscount = '',
61
+								$itemsperpage = '') {
62 62
 		parent::__construct();
63 63
 
64 64
 		$this->format = $format;
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/DataResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	 * @param array $headers additional key value based headers
51 51
 	 * @since 8.0.0
52 52
 	 */
53
-	public function __construct($data=array(), $statusCode=Http::STATUS_OK,
54
-	                            array $headers=array()) {
53
+	public function __construct($data = array(), $statusCode = Http::STATUS_OK,
54
+	                            array $headers = array()) {
55 55
 		parent::__construct();
56 56
 
57 57
 		$this->data = $data;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 * @return DataResponse Reference to this object
67 67
 	 * @since 8.0.0
68 68
 	 */
69
-	public function setData($data){
69
+	public function setData($data) {
70 70
 		$this->data = $data;
71 71
 
72 72
 		return $this;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * @return array the data
79 79
 	 * @since 8.0.0
80 80
 	 */
81
-	public function getData(){
81
+	public function getData() {
82 82
 		return $this->data;
83 83
 	}
84 84
 
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/JSONResponse.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @param int $statusCode the Http status code, defaults to 200
53 53
 	 * @since 6.0.0
54 54
 	 */
55
-	public function __construct($data=array(), $statusCode=Http::STATUS_OK) {
55
+	public function __construct($data = array(), $statusCode = Http::STATUS_OK) {
56 56
 		parent::__construct();
57 57
 
58 58
 		$this->data = $data;
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public function render() {
71 71
 		$response = json_encode($this->data, JSON_HEX_TAG);
72
-		if($response === false) {
73
-			throw new \Exception(sprintf('Could not json_encode due to invalid ' .
72
+		if ($response === false) {
73
+			throw new \Exception(sprintf('Could not json_encode due to invalid '.
74 74
 				'non UTF-8 characters in the array: %s', var_export($this->data, true)));
75 75
 		}
76 76
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @return JSONResponse Reference to this object
85 85
 	 * @since 6.0.0 - return value was added in 7.0.0
86 86
 	 */
87
-	public function setData($data){
87
+	public function setData($data) {
88 88
 		$this->data = $data;
89 89
 
90 90
 		return $this;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 * @return array the data
97 97
 	 * @since 6.0.0
98 98
 	 */
99
-	public function getData(){
99
+	public function getData() {
100 100
 		return $this->data;
101 101
 	}
102 102
 
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/TemplateResponse.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
  */
38 38
 class TemplateResponse extends Response {
39 39
 
40
-	const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class . '::loadAdditionalScripts';
41
-	const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class . '::loadAdditionalScriptsLoggedIn';
40
+	const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class.'::loadAdditionalScripts';
41
+	const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class.'::loadAdditionalScriptsLoggedIn';
42 42
 
43 43
 	/**
44 44
 	 * name of the template
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 	 * @param string $renderAs how the page should be rendered, defaults to user
74 74
 	 * @since 6.0.0 - parameters $params and $renderAs were added in 7.0.0
75 75
 	 */
76
-	public function __construct($appName, $templateName, array $params=array(),
77
-	                            $renderAs='user') {
76
+	public function __construct($appName, $templateName, array $params = array(),
77
+	                            $renderAs = 'user') {
78 78
 		parent::__construct();
79 79
 
80 80
 		$this->templateName = $templateName;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @return TemplateResponse Reference to this object
94 94
 	 * @since 6.0.0 - return value was added in 7.0.0
95 95
 	 */
96
-	public function setParams(array $params){
96
+	public function setParams(array $params) {
97 97
 		$this->params = $params;
98 98
 
99 99
 		return $this;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 * @return array the params
106 106
 	 * @since 6.0.0
107 107
 	 */
108
-	public function getParams(){
108
+	public function getParams() {
109 109
 		return $this->params;
110 110
 	}
111 111
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @return string the name of the used template
116 116
 	 * @since 6.0.0
117 117
 	 */
118
-	public function getTemplateName(){
118
+	public function getTemplateName() {
119 119
 		return $this->templateName;
120 120
 	}
121 121
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @return TemplateResponse Reference to this object
130 130
 	 * @since 6.0.0 - return value was added in 7.0.0
131 131
 	 */
132
-	public function renderAs($renderAs){
132
+	public function renderAs($renderAs) {
133 133
 		$this->renderAs = $renderAs;
134 134
 
135 135
 		return $this;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * @return string the renderAs value
142 142
 	 * @since 6.0.0
143 143
 	 */
144
-	public function getRenderAs(){
144
+	public function getRenderAs() {
145 145
 		return $this->renderAs;
146 146
 	}
147 147
 
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
 	 * @return string the rendered html
152 152
 	 * @since 6.0.0
153 153
 	 */
154
-	public function render(){
154
+	public function render() {
155 155
 		// \OCP\Template needs an empty string instead of 'blank' for an unwrapped response
156 156
 		$renderAs = $this->renderAs === 'blank' ? '' : $this->renderAs;
157 157
 
158 158
 		$template = new \OCP\Template($this->appName, $this->templateName, $renderAs);
159 159
 
160
-		foreach($this->params as $key => $value){
160
+		foreach ($this->params as $key => $value) {
161 161
 			$template->assign($key, $value);
162 162
 		}
163 163
 
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/StreamResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * @param string|resource $filePath the path to the file or a file handle which should be streamed
42 42
 	 * @since 8.1.0
43 43
 	 */
44
-	public function __construct ($filePath) {
44
+	public function __construct($filePath) {
45 45
 		parent::__construct();
46 46
 
47 47
 		$this->filePath = $filePath;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @param IOutput $output a small wrapper that handles output
55 55
 	 * @since 8.1.0
56 56
 	 */
57
-	public function callback (IOutput $output) {
57
+	public function callback(IOutput $output) {
58 58
 		// handle caching
59 59
 		if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
60 60
 			if (!(is_resource($this->filePath) || file_exists($this->filePath))) {
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/DataDisplayResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 	 * @param array $headers additional key value based headers
48 48
 	 * @since 8.1.0
49 49
 	 */
50
-	public function __construct($data='', $statusCode=Http::STATUS_OK,
51
-	                            $headers=[]) {
50
+	public function __construct($data = '', $statusCode = Http::STATUS_OK,
51
+	                            $headers = []) {
52 52
 		parent::__construct();
53 53
 
54 54
 		$this->data = $data;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 * @return DataDisplayResponse Reference to this object
74 74
 	 * @since 8.1.0
75 75
 	 */
76
-	public function setData($data){
76
+	public function setData($data) {
77 77
 		$this->data = $data;
78 78
 
79 79
 		return $this;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @return string the data
86 86
 	 * @since 8.1.0
87 87
 	 */
88
-	public function getData(){
88
+	public function getData() {
89 89
 		return $this->data;
90 90
 	}
91 91
 
Please login to merge, or discard this patch.