Completed
Push — stable13 ( 9d3a4b...5f029e )
by Morris
105:36 queued 79:13
created
apps/oauth2/lib/Db/ClientMapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		$result = $qb->execute();
50 50
 		$row = $result->fetch();
51 51
 		$result->closeCursor();
52
-		if($row === false) {
52
+		if ($row === false) {
53 53
 			throw new ClientNotFoundException();
54 54
 		}
55 55
 		return Client::fromRow($row);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$result = $qb->execute();
70 70
 		$row = $result->fetch();
71 71
 		$result->closeCursor();
72
-		if($row === false) {
72
+		if ($row === false) {
73 73
 			throw new ClientNotFoundException();
74 74
 		}
75 75
 		return Client::fromRow($row);
Please login to merge, or discard this patch.
apps/oauth2/lib/Db/AccessTokenMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 		$result = $qb->execute();
50 50
 		$row = $result->fetch();
51 51
 		$result->closeCursor();
52
-		if($row === false) {
52
+		if ($row === false) {
53 53
 			throw new AccessTokenNotFoundException();
54 54
 		}
55 55
 		return AccessToken::fromRow($row);
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/Auth.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 	 */
171 171
 	private function requiresCSRFCheck() {
172 172
 		// GET requires no check at all
173
-		if($this->request->getMethod() === 'GET') {
173
+		if ($this->request->getMethod() === 'GET') {
174 174
 			return false;
175 175
 		}
176 176
 
177 177
 		// Official Nextcloud clients require no checks
178
-		if($this->request->isUserAgent([
178
+		if ($this->request->isUserAgent([
179 179
 			IRequest::USER_AGENT_CLIENT_DESKTOP,
180 180
 			IRequest::USER_AGENT_CLIENT_ANDROID,
181 181
 			IRequest::USER_AGENT_CLIENT_IOS,
@@ -184,17 +184,17 @@  discard block
 block discarded – undo
184 184
 		}
185 185
 
186 186
 		// If not logged-in no check is required
187
-		if(!$this->userSession->isLoggedIn()) {
187
+		if (!$this->userSession->isLoggedIn()) {
188 188
 			return false;
189 189
 		}
190 190
 
191 191
 		// POST always requires a check
192
-		if($this->request->getMethod() === 'POST') {
192
+		if ($this->request->getMethod() === 'POST') {
193 193
 			return true;
194 194
 		}
195 195
 
196 196
 		// If logged-in AND DAV authenticated no check is required
197
-		if($this->userSession->isLoggedIn() &&
197
+		if ($this->userSession->isLoggedIn() &&
198 198
 			$this->isDavAuthenticated($this->userSession->getUser()->getUID())) {
199 199
 			return false;
200 200
 		}
@@ -211,10 +211,10 @@  discard block
 block discarded – undo
211 211
 	private function auth(RequestInterface $request, ResponseInterface $response) {
212 212
 		$forcedLogout = false;
213 213
 
214
-		if(!$this->request->passesCSRFCheck() &&
214
+		if (!$this->request->passesCSRFCheck() &&
215 215
 			$this->requiresCSRFCheck()) {
216 216
 			// In case of a fail with POST we need to recheck the credentials
217
-			if($this->request->getMethod() === 'POST') {
217
+			if ($this->request->getMethod() === 'POST') {
218 218
 				$forcedLogout = true;
219 219
 			} else {
220 220
 				$response->setStatus(401);
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
 			}
223 223
 		}
224 224
 
225
-		if($forcedLogout) {
225
+		if ($forcedLogout) {
226 226
 			$this->userSession->logout();
227 227
 		} else {
228
-			if($this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) {
228
+			if ($this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) {
229 229
 				throw new \Sabre\DAV\Exception\NotAuthenticated('2FA challenge not passed.');
230 230
 			}
231 231
 			if (\OC_User::handleApacheAuth() ||
@@ -238,19 +238,19 @@  discard block
 block discarded – undo
238 238
 				\OC_Util::setupFS($user);
239 239
 				$this->currentUser = $user;
240 240
 				$this->session->close();
241
-				return [true, $this->principalPrefix . $user];
241
+				return [true, $this->principalPrefix.$user];
242 242
 			}
243 243
 		}
244 244
 
245 245
 		if (!$this->userSession->isLoggedIn() && in_array('XMLHttpRequest', explode(',', $request->getHeader('X-Requested-With')))) {
246 246
 			// do not re-authenticate over ajax, use dummy auth name to prevent browser popup
247
-			$response->addHeader('WWW-Authenticate','DummyBasic realm="' . $this->realm . '"');
247
+			$response->addHeader('WWW-Authenticate', 'DummyBasic realm="'.$this->realm.'"');
248 248
 			$response->setStatus(401);
249 249
 			throw new \Sabre\DAV\Exception\NotAuthenticated('Cannot authenticate over ajax calls');
250 250
 		}
251 251
 
252 252
 		$data = parent::check($request, $response);
253
-		if($data[0] === true) {
253
+		if ($data[0] === true) {
254 254
 			$startPos = strrpos($data[1], '/') + 1;
255 255
 			$user = $this->userSession->getUser()->getUID();
256 256
 			$data[1] = substr_replace($data[1], $user, $startPos);
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/BearerAuth.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	private function setupUserFs($userId) {
56 56
 		\OC_Util::setupFS($userId);
57 57
 		$this->session->close();
58
-		return $this->principalPrefix . $userId;
58
+		return $this->principalPrefix.$userId;
59 59
 	}
60 60
 
61 61
 	/**
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 	public function validateBearerToken($bearerToken) {
65 65
 		\OC_Util::setupFS();
66 66
 
67
-		if(!$this->userSession->isLoggedIn()) {
67
+		if (!$this->userSession->isLoggedIn()) {
68 68
 			$this->userSession->tryTokenLogin($this->request);
69 69
 		}
70
-		if($this->userSession->isLoggedIn()) {
70
+		if ($this->userSession->isLoggedIn()) {
71 71
 			return $this->setupUserFs($this->userSession->getUser()->getUID());
72 72
 		}
73 73
 
Please login to merge, or discard this patch.
lib/private/Template/JSResourceLocator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,26 +71,26 @@
 block discarded – undo
71 71
 		}
72 72
 
73 73
 		$app = substr($script, 0, strpos($script, '/'));
74
-		$script = substr($script, strpos($script, '/')+1);
74
+		$script = substr($script, strpos($script, '/') + 1);
75 75
 		$app_path = \OC_App::getAppPath($app);
76 76
 		$app_url = \OC_App::getAppWebPath($app);
77 77
 
78 78
 		// missing translations files fill be ignored
79 79
 		if (strpos($script, 'l10n/') === 0) {
80
-			$this->appendIfExist($app_path, $script . '.js', $app_url);
80
+			$this->appendIfExist($app_path, $script.'.js', $app_url);
81 81
 			return;
82 82
 		}
83 83
 
84 84
 		if ($app_path === false && $app_url === false) {
85 85
 			$this->logger->error('Could not find resource {resource} to load', [
86
-				'resource' => $app . '/' . $script . '.js',
86
+				'resource' => $app.'/'.$script.'.js',
87 87
 				'app' => 'jsresourceloader',
88 88
 			]);
89 89
 			return;
90 90
 		}
91 91
 
92 92
 		if (!$this->cacheAndAppendCombineJsonIfExist($app_path, $script.'.json', $app)) {
93
-			$this->append($app_path, $script . '.js', $app_url);
93
+			$this->append($app_path, $script.'.js', $app_url);
94 94
 		}
95 95
 	}
96 96
 
Please login to merge, or discard this patch.
settings/templates/settings/additional.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
 
27 27
 ?>
28 28
 
29
-<?php foreach($_['forms'] as $form) {
29
+<?php foreach ($_['forms'] as $form) {
30 30
 	if (isset($form['form'])) {?>
31
-		<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div>
31
+		<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div>
32 32
 	<?php }
33 33
 };?>
Please login to merge, or discard this patch.
lib/private/Console/Application.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
 			$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
92 92
 		}
93 93
 		try {
94
-			require_once __DIR__ . '/../../../core/register_command.php';
94
+			require_once __DIR__.'/../../../core/register_command.php';
95 95
 			if ($this->config->getSystemValue('installed', false)) {
96 96
 				if (\OCP\Util::needUpgrade()) {
97 97
 					throw new NeedsUpdateException();
98 98
 				} elseif ($this->config->getSystemValue('maintenance', false)) {
99 99
 					if ($input->getArgument('command') !== '_completion') {
100 100
 						$errOutput = $output->getErrorOutput();
101
-						$errOutput->writeln('<comment>Nextcloud is in maintenance mode - no apps have been loaded</comment>' . PHP_EOL);
101
+						$errOutput->writeln('<comment>Nextcloud is in maintenance mode - no apps have been loaded</comment>'.PHP_EOL);
102 102
 					}
103 103
 				} else {
104 104
 					OC_App::loadApps();
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 						}
115 115
 						// load from register_command.php
116 116
 						\OC_App::registerAutoloading($app, $appPath);
117
-						$file = $appPath . '/appinfo/register_command.php';
117
+						$file = $appPath.'/appinfo/register_command.php';
118 118
 						if (file_exists($file)) {
119 119
 							try {
120 120
 								require $file;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 			} else if ($input->getArgument('command') !== '_completion') {
128 128
 				$output->writeln("Nextcloud is not installed - only a limited number of commands are available");
129 129
 			}
130
-		} catch(NeedsUpdateException $e) {
130
+		} catch (NeedsUpdateException $e) {
131 131
 			if ($input->getArgument('command') !== '_completion') {
132 132
 				$output->writeln("Nextcloud or one of the apps require upgrade - only a limited number of commands are available");
133 133
 				$output->writeln("You may use your browser or the occ upgrade command to do the upgrade");
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 			$errors = \OC_Util::checkServer(\OC::$server->getSystemConfig());
139 139
 			if (!empty($errors)) {
140 140
 				foreach ($errors as $error) {
141
-					$output->writeln((string)$error['error']);
142
-					$output->writeln((string)$error['hint']);
141
+					$output->writeln((string) $error['error']);
142
+					$output->writeln((string) $error['hint']);
143 143
 					$output->writeln('');
144 144
 				}
145 145
 				throw new \Exception("Environment not properly prepared.");
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
@@ -17,18 +17,18 @@
 block discarded – undo
17 17
 		<?php emit_script_loading_tags($_); ?>
18 18
 		<?php print_unescaped($_['headers']); ?>
19 19
 	</head>
20
-	<body id="<?php p($_['bodyid']);?>">
20
+	<body id="<?php p($_['bodyid']); ?>">
21 21
 		<?php include('layout.noscript.warning.php'); ?>
22 22
 		<div class="wrapper">
23 23
 			<div class="v-align">
24
-				<?php if ($_['bodyid'] === 'body-login' ): ?>
24
+				<?php if ($_['bodyid'] === 'body-login'): ?>
25 25
 					<header role="banner">
26 26
 						<div id="header">
27 27
 							<div class="logo">
28 28
 								<h1 class="hidden-visually">
29 29
 									<?php p($theme->getName()); ?>
30 30
 								</h1>
31
-								<?php if(\OC::$server->getConfig()->getSystemValue('installed', false)
31
+								<?php if (\OC::$server->getConfig()->getSystemValue('installed', false)
32 32
 									&& \OC::$server->getConfig()->getAppValue('theming', 'logoMime', false)): ?>
33 33
 									<img src="<?php p($theme->getLogo()); ?>"/>
34 34
 								<?php endif; ?>
Please login to merge, or discard this patch.
lib/private/App/CodeChecker/InfoChecker.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 		$errors = [];
80 80
 
81
-		$info = $this->infoParser->parse($appPath . '/appinfo/info.xml');
81
+		$info = $this->infoParser->parse($appPath.'/appinfo/info.xml');
82 82
 
83 83
 		if (!isset($info['dependencies']['nextcloud']['@attributes']['min-version'])) {
84 84
 			$errors[] = [
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		}
98 98
 
99 99
 		foreach ($info as $key => $value) {
100
-			if(is_array($value)) {
100
+			if (is_array($value)) {
101 101
 				$value = json_encode($value);
102 102
 			}
103 103
 			if (in_array($key, $this->mandatoryFields)) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 			if (in_array($key, $this->deprecatedFields)) {
114 114
 				// skip empty arrays - empty arrays for remote and public are always added
115
-				if($value === '[]' && in_array($key, ['public', 'remote', 'info'])) {
115
+				if ($value === '[]' && in_array($key, ['public', 'remote', 'info'])) {
116 116
 					continue;
117 117
 				}
118 118
 				$this->emit('InfoChecker', 'deprecatedFieldFound', [$key, $value]);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 		}
124 124
 
125 125
 		foreach ($this->mandatoryFields as $key) {
126
-			if(!isset($info[$key])) {
126
+			if (!isset($info[$key])) {
127 127
 				$this->emit('InfoChecker', 'mandatoryFieldMissing', [$key]);
128 128
 				$errors[] = [
129 129
 					'type' => 'mandatoryFieldMissing',
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 			}
133 133
 		}
134 134
 
135
-		$versionFile = $appPath . '/appinfo/version';
135
+		$versionFile = $appPath.'/appinfo/version';
136 136
 		if (is_file($versionFile)) {
137 137
 			$version = trim(file_get_contents($versionFile));
138 138
 			$this->emit('InfoChecker', 'migrateVersion', [$version]);
Please login to merge, or discard this patch.