Completed
Pull Request — master (#10075)
by
unknown
27:10
created
lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 		$anonPeriod = $this->reflector->getAnnotationParameter('AnonRateThrottle', 'period');
85 85
 		$userLimit = $this->reflector->getAnnotationParameter('UserRateThrottle', 'limit');
86 86
 		$userPeriod = $this->reflector->getAnnotationParameter('UserRateThrottle', 'period');
87
-		$rateLimitIdentifier = get_class($controller) . '::' . $methodName;
88
-		if($userLimit !== '' && $userPeriod !== '' && $this->userSession->isLoggedIn()) {
87
+		$rateLimitIdentifier = get_class($controller).'::'.$methodName;
88
+		if ($userLimit !== '' && $userPeriod !== '' && $this->userSession->isLoggedIn()) {
89 89
 			$this->limiter->registerUserRequest(
90 90
 				$rateLimitIdentifier,
91 91
 				$userLimit,
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	 * {@inheritDoc}
107 107
 	 */
108 108
 	public function afterException($controller, $methodName, \Exception $exception) {
109
-		if($exception instanceof RateLimitExceededException) {
110
-			if (stripos($this->request->getHeader('Accept'),'html') === false) {
109
+		if ($exception instanceof RateLimitExceededException) {
110
+			if (stripos($this->request->getHeader('Accept'), 'html') === false) {
111 111
 				$response = new JSONResponse(
112 112
 					[
113 113
 						'message' => $exception->getMessage(),
Please login to merge, or discard this patch.
lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	public function beforeController($controller, $methodName) {
62 62
 		parent::beforeController($controller, $methodName);
63 63
 
64
-		if($this->reflector->hasAnnotation('BruteForceProtection')) {
64
+		if ($this->reflector->hasAnnotation('BruteForceProtection')) {
65 65
 			$action = $this->reflector->getAnnotationParameter('BruteForceProtection', 'action');
66 66
 			$this->throttler->sleepDelay($this->request->getRemoteAddress(), $action);
67 67
 		}
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * {@inheritDoc}
72 72
 	 */
73 73
 	public function afterController($controller, $methodName, Response $response) {
74
-		if($this->reflector->hasAnnotation('BruteForceProtection') && $response->isThrottled()) {
74
+		if ($this->reflector->hasAnnotation('BruteForceProtection') && $response->isThrottled()) {
75 75
 			$action = $this->reflector->getAnnotationParameter('BruteForceProtection', 'action');
76 76
 			$ip = $this->request->getRemoteAddress();
77 77
 			$this->throttler->sleepDelay($ip, $action);
Please login to merge, or discard this patch.
apps/files_external/lib/Controller/UserStoragesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
 		} catch (NotFoundException $e) {
199 199
 			return new DataResponse(
200 200
 				[
201
-					'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id))
201
+					'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id))
202 202
 				],
203 203
 				Http::STATUS_NOT_FOUND
204 204
 			);
Please login to merge, or discard this patch.
apps/files_external/lib/Controller/UserGlobalStoragesController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		} catch (NotFoundException $e) {
123 123
 			return new DataResponse(
124 124
 				[
125
-					'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id))
125
+					'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id))
126 126
 				],
127 127
 				Http::STATUS_NOT_FOUND
128 128
 			);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			} else {
163 163
 				return new DataResponse(
164 164
 					[
165
-						'message' => (string)$this->l10n->t('Storage with ID "%d" is not user editable', array($id))
165
+						'message' => (string) $this->l10n->t('Storage with ID "%d" is not user editable', array($id))
166 166
 					],
167 167
 					Http::STATUS_FORBIDDEN
168 168
 				);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		} catch (NotFoundException $e) {
171 171
 			return new DataResponse(
172 172
 				[
173
-					'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id))
173
+					'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id))
174 174
 				],
175 175
 				Http::STATUS_NOT_FOUND
176 176
 			);
Please login to merge, or discard this patch.
apps/files_external/lib/Controller/GlobalStoragesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
 		} catch (NotFoundException $e) {
199 199
 			return new DataResponse(
200 200
 				[
201
-					'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id))
201
+					'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id))
202 202
 				],
203 203
 				Http::STATUS_NOT_FOUND
204 204
 			);
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,19 +11,19 @@
 block discarded – undo
11 11
 	<p class="settings-hint"><?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.')); ?></p>
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
 
18 18
 	<ul id="listOfTrustedServers">
19
-		<?php foreach($_['trustedServers'] as $trustedServer) { ?>
19
+		<?php foreach ($_['trustedServers'] as $trustedServer) { ?>
20 20
 			<li id="<?php p($trustedServer['id']); ?>">
21
-				<?php if((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
21
+				<?php if ((int) $trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
22 22
 					<span class="status success"></span>
23 23
 				<?php
24
-				} elseif(
25
-					(int)$trustedServer['status'] === TrustedServers::STATUS_PENDING ||
26
-					(int)$trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED
24
+				} elseif (
25
+					(int) $trustedServer['status'] === TrustedServers::STATUS_PENDING ||
26
+					(int) $trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED
27 27
 				) { ?>
28 28
 					<span class="status indeterminate"></span>
29 29
 				<?php } else {?>
Please login to merge, or discard this patch.
apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$offset = $arguments['offset'];
70 70
 		$stopAt = $arguments['stopAt'];
71 71
 
72
-		$this->logger->info('Building calendar index (' . $offset .'/' . $stopAt . ')');
72
+		$this->logger->info('Building calendar index ('.$offset.'/'.$stopAt.')');
73 73
 
74 74
 		$offset = $this->buildIndex($offset, $stopAt);
75 75
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 				'offset' => $offset,
81 81
 				'stopAt' => $stopAt
82 82
 			]);
83
-			$this->logger->info('New building calendar index job scheduled with offset ' . $offset);
83
+			$this->logger->info('New building calendar index job scheduled with offset '.$offset);
84 84
 		}
85 85
 	}
86 86
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 			->orderBy('id', 'ASC');
101 101
 
102 102
 		$stmt = $query->execute();
103
-		while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
103
+		while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
104 104
 			$offset = $row['id'];
105 105
 
106 106
 			$calendarData = $row['calendardata'];
Please login to merge, or discard this patch.
apps/dav/lib/Migration/BuildCalendarSearchIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 		$query = $this->db->getQueryBuilder();
73 73
 		$query->select($query->createFunction('MAX(id)'))
74 74
 			->from('calendarobjects');
75
-		$maxId = (int)$query->execute()->fetchColumn();
75
+		$maxId = (int) $query->execute()->fetchColumn();
76 76
 
77 77
 		$output->info('Add background job');
78 78
 		$this->jobList->add(BuildCalendarSearchIndexBackgroundJob::class, [
Please login to merge, or discard this patch.
apps/sharebymail/templates/settings-admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
 	<p class="settings-hint"><?php p($l->t('Allows users to share a personalized link to a file or folder by putting in an email address.')); ?></p>
12 12
 
13 13
 	<p>
14
-		<input id="sendPasswordMail" type="checkbox" class="checkbox" <?php if($_['sendPasswordMail']) p('checked'); ?> />
14
+		<input id="sendPasswordMail" type="checkbox" class="checkbox" <?php if ($_['sendPasswordMail']) p('checked'); ?> />
15 15
 		<label for="sendPasswordMail"><?php p($l->t('Send password by mail')); ?></label><br/>
16
-		<input id="enforcePasswordProtection" type="checkbox" class="checkbox" <?php if($_['enforcePasswordProtection']) p('checked'); ?> />
16
+		<input id="enforcePasswordProtection" type="checkbox" class="checkbox" <?php if ($_['enforcePasswordProtection']) p('checked'); ?> />
17 17
 		<label for="enforcePasswordProtection"><?php p($l->t('Enforce password protection')); ?></label>
18 18
 	</p>
19 19
 
Please login to merge, or discard this patch.