Completed
Branch master (69e0e2)
by Johannes
12:08
created
apps/testing/lib/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 use OCA\Testing\AlternativeHomeUserBackend;
26 26
 
27 27
 class Application extends App {
28
-	public function __construct (array $urlParams = array()) {
28
+	public function __construct(array $urlParams = array()) {
29 29
 		$appName = 'testing';
30 30
 		parent::__construct($appName, $urlParams);
31 31
 
Please login to merge, or discard this patch.
apps/testing/lib/AlternativeHomeUserBackend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 			if ($uid !== 'admin') {
49 49
 				$uid = md5($uid);
50 50
 			}
51
-			return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $uid;
51
+			return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/'.$uid;
52 52
 		}
53 53
 
54 54
 		return false;
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Notifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,12 +184,12 @@
 block discarded – undo
184 184
 		}
185 185
 
186 186
 		try {
187
-			$this->getDisplayNameFromContact($user . '@http://' . $server);
187
+			$this->getDisplayNameFromContact($user.'@http://'.$server);
188 188
 		} catch (\OutOfBoundsException $e) {
189 189
 		}
190 190
 
191 191
 		try {
192
-			$this->getDisplayNameFromContact($user . '@https://' . $server);
192
+			$this->getDisplayNameFromContact($user.'@https://'.$server);
193 193
 		} catch (\OutOfBoundsException $e) {
194 194
 		}
195 195
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		$storedPassword = $share->getPassword();
148 148
 		$authenticated = $this->session->get('public_link_authenticated') === $share->getId() ||
149 149
 			$this->shareManager->checkPassword($share, $password);
150
-		if (!empty($storedPassword) && !$authenticated ) {
150
+		if (!empty($storedPassword) && !$authenticated) {
151 151
 			return new JSONResponse(
152 152
 				['message' => 'No permission to access the share'],
153 153
 				Http::STATUS_BAD_REQUEST
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 		$httpClient = $this->clientService->newClient();
190 190
 
191 191
 		try {
192
-			$response = $httpClient->post($remote . '/index.php/apps/federatedfilesharing/createFederatedShare',
192
+			$response = $httpClient->post($remote.'/index.php/apps/federatedfilesharing/createFederatedShare',
193 193
 				[
194 194
 					'body' =>
195 195
 						[
@@ -287,14 +287,14 @@  discard block
 block discarded – undo
287 287
 			// note: checkStorageAvailability will already remove the invalid share
288 288
 			Util::writeLog(
289 289
 				'federatedfilesharing',
290
-				'Invalid remote storage: ' . get_class($e) . ': ' . $e->getMessage(),
290
+				'Invalid remote storage: '.get_class($e).': '.$e->getMessage(),
291 291
 				Util::DEBUG
292 292
 			);
293 293
 			return new JSONResponse(['message' => $this->l->t('Could not authenticate to remote share, password might be wrong')], Http::STATUS_BAD_REQUEST);
294 294
 		} catch (\Exception $e) {
295 295
 			Util::writeLog(
296 296
 				'federatedfilesharing',
297
-				'Invalid remote storage: ' . get_class($e) . ': ' . $e->getMessage(),
297
+				'Invalid remote storage: '.get_class($e).': '.$e->getMessage(),
298 298
 				Util::DEBUG
299 299
 			);
300 300
 			$externalManager->removeShare($mount->getMountPoint());
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
 			} catch (StorageInvalidException $e) {
314 314
 				Util::writeLog(
315 315
 					'federatedfilesharing',
316
-					'Invalid remote storage: ' . get_class($e) . ': ' . $e->getMessage(),
316
+					'Invalid remote storage: '.get_class($e).': '.$e->getMessage(),
317 317
 					Util::DEBUG
318 318
 				);
319 319
 				return new JSONResponse(['message' => $this->l->t('Storage not valid')], Http::STATUS_BAD_REQUEST);
320 320
 			} catch (\Exception $e) {
321 321
 				Util::writeLog(
322 322
 					'federatedfilesharing',
323
-					'Invalid remote storage: ' . get_class($e) . ': ' . $e->getMessage(),
323
+					'Invalid remote storage: '.get_class($e).': '.$e->getMessage(),
324 324
 					Util::DEBUG
325 325
 				);
326 326
 				return new JSONResponse(['message' => $this->l->t('Couldn\'t add remote share')], Http::STATUS_BAD_REQUEST);
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		$token = $argument['token'];
106 106
 		$action = $argument['action'];
107 107
 		$data = json_decode($argument['data'], true);
108
-		$try = (int)$argument['try'] + 1;
108
+		$try = (int) $argument['try'] + 1;
109 109
 
110 110
 		$result = $this->notifications->sendUpdateToRemote($remote, $remoteId, $token, $action, $data, $try);
111 111
 		
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 				'token' => $argument['token'],
129 129
 				'data' => $argument['data'],
130 130
 				'action' => $argument['action'],
131
-				'try' => (int)$argument['try'] + 1,
131
+				'try' => (int) $argument['try'] + 1,
132 132
 				'lastRun' => time()
133 133
 			]
134 134
 		);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * @return bool
142 142
 	 */
143 143
 	protected function shouldRun(array $argument) {
144
-		$lastRun = (int)$argument['lastRun'];
144
+		$lastRun = (int) $argument['lastRun'];
145 145
 		return ((time() - $lastRun) > $this->interval);
146 146
 	}
147 147
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/TokenHandler.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
 	public function generateToken() {
56 56
 		$token = $this->secureRandom->generate(
57 57
 			self::TOKEN_LENGTH,
58
-			ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS);
58
+			ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS);
59 59
 		return $token;
60 60
 	}
61 61
 
Please login to merge, or discard this patch.
apps/federation/templates/settings-admin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 	<em><?php p($l->t('Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.')); ?></em>
12 12
 
13 13
 	<p>
14
-		<input id="autoAddServers" type="checkbox" class="checkbox" <?php if($_['autoAddServers']) p('checked'); ?> />
14
+		<input id="autoAddServers" type="checkbox" class="checkbox" <?php if ($_['autoAddServers']) p('checked'); ?> />
15 15
 		<label for="autoAddServers"><?php p($l->t('Add server automatically once a federated share was created successfully')); ?></label>
16 16
 	</p>
17 17
 
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 		<span class="msg"></span>
24 24
 	</p>
25 25
 	<ul id="listOfTrustedServers">
26
-		<?php foreach($_['trustedServers'] as $trustedServer) { ?>
26
+		<?php foreach ($_['trustedServers'] as $trustedServer) { ?>
27 27
 			<li id="<?php p($trustedServer['id']); ?>">
28
-				<?php if((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
28
+				<?php if ((int) $trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
29 29
 					<span class="status success"></span>
30 30
 				<?php
31
-				} elseif(
32
-					(int)$trustedServer['status'] === TrustedServers::STATUS_PENDING ||
33
-					(int)$trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED
31
+				} elseif (
32
+					(int) $trustedServer['status'] === TrustedServers::STATUS_PENDING ||
33
+					(int) $trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED
34 34
 				) { ?>
35 35
 					<span class="status indeterminate"></span>
36 36
 				<?php } else {?>
Please login to merge, or discard this patch.
apps/federation/lib/Controller/OCSAuthAPIController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  *
45 45
  * @package OCA\Federation\Controller
46 46
  */
47
-class OCSAuthAPIController extends OCSController{
47
+class OCSAuthAPIController extends OCSController {
48 48
 
49 49
 	/** @var ISecureRandom  */
50 50
 	private $secureRandom;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function requestSharedSecret($url, $token) {
105 105
 		if ($this->trustedServers->isTrustedServer($url) === false) {
106
-			$this->logger->error('remote server not trusted (' . $url . ') while requesting shared secret', ['app' => 'federation']);
106
+			$this->logger->error('remote server not trusted ('.$url.') while requesting shared secret', ['app' => 'federation']);
107 107
 			throw new OCSForbiddenException();
108 108
 		}
109 109
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		$localToken = $this->dbHandler->getToken($url);
113 113
 		if (strcmp($localToken, $token) > 0) {
114 114
 			$this->logger->info(
115
-				'remote server (' . $url . ') presented lower token. We will initiate the exchange of the shared secret.',
115
+				'remote server ('.$url.') presented lower token. We will initiate the exchange of the shared secret.',
116 116
 				['app' => 'federation']
117 117
 			);
118 118
 			throw new OCSForbiddenException();
@@ -151,14 +151,14 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getSharedSecret($url, $token) {
153 153
 		if ($this->trustedServers->isTrustedServer($url) === false) {
154
-			$this->logger->error('remote server not trusted (' . $url . ') while getting shared secret', ['app' => 'federation']);
154
+			$this->logger->error('remote server not trusted ('.$url.') while getting shared secret', ['app' => 'federation']);
155 155
 			throw new OCSForbiddenException();
156 156
 		}
157 157
 
158 158
 		if ($this->isValidToken($url, $token) === false) {
159 159
 			$expectedToken = $this->dbHandler->getToken($url);
160 160
 			$this->logger->error(
161
-				'remote server (' . $url . ') didn\'t send a valid token (got "' . $token . '" but expected "'. $expectedToken . '") while getting shared secret',
161
+				'remote server ('.$url.') didn\'t send a valid token (got "'.$token.'" but expected "'.$expectedToken.'") while getting shared secret',
162 162
 				['app' => 'federation']
163 163
 			);
164 164
 			throw new OCSForbiddenException();
Please login to merge, or discard this patch.
apps/federation/lib/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 			);
83 83
 		});
84 84
 
85
-		$container->registerService('SettingsController', function (IAppContainer $c) {
85
+		$container->registerService('SettingsController', function(IAppContainer $c) {
86 86
 			$server = $c->getServer();
87 87
 			return new SettingsController(
88 88
 				$c->getAppName(),
Please login to merge, or discard this patch.