@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | $result = $query->execute(); |
88 | 88 | |
89 | 89 | if ($result) { |
90 | - return (int)$this->connection->lastInsertId('*PREFIX*'.$this->dbTable); |
|
90 | + return (int) $this->connection->lastInsertId('*PREFIX*'.$this->dbTable); |
|
91 | 91 | } |
92 | 92 | |
93 | - $message = 'Internal failure, Could not add trusted server: ' . $url; |
|
93 | + $message = 'Internal failure, Could not add trusted server: '.$url; |
|
94 | 94 | $message_t = $this->IL10N->t('Could not add server'); |
95 | 95 | throw new HintException($message, $message_t); |
96 | 96 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $result = $query->execute()->fetchAll(); |
125 | 125 | |
126 | 126 | if (empty($result)) { |
127 | - throw new \Exception('No Server found with ID: ' . $id); |
|
127 | + throw new \Exception('No Server found with ID: '.$id); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $result[0]; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $statement->closeCursor(); |
202 | 202 | |
203 | 203 | if (!isset($result['token'])) { |
204 | - throw new \Exception('No token found for: ' . $url); |
|
204 | + throw new \Exception('No token found for: '.$url); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | return $result['token']; |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $statement = $query->execute(); |
279 | 279 | $result = $statement->fetch(); |
280 | 280 | $statement->closeCursor(); |
281 | - return (int)$result['status']; |
|
281 | + return (int) $result['status']; |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | /** |
@@ -55,8 +55,8 @@ |
||
55 | 55 | |
56 | 56 | $convertedAddresses = array(); |
57 | 57 | |
58 | - foreach($addresses as $email => $readableName) { |
|
59 | - if(!is_numeric($email)) { |
|
58 | + foreach ($addresses as $email => $readableName) { |
|
59 | + if (!is_numeric($email)) { |
|
60 | 60 | list($name, $domain) = explode('@', $email, 2); |
61 | 61 | $domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46); |
62 | 62 | $convertedAddresses[$name.'@'.$domain] = $readableName; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $mailer = $this->getInstance(); |
130 | 130 | |
131 | 131 | // Enable logger if debug mode is enabled |
132 | - if($debugMode) { |
|
132 | + if ($debugMode) { |
|
133 | 133 | $mailLogger = new \Swift_Plugins_Loggers_ArrayLogger(); |
134 | 134 | $mailer->registerPlugin(new \Swift_Plugins_LoggerPlugin($mailLogger)); |
135 | 135 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | // Debugging logging |
140 | 140 | $logMessage = sprintf('Sent mail to "%s" with subject "%s"', print_r($message->getTo(), true), $message->getSubject()); |
141 | 141 | $this->logger->debug($logMessage, ['app' => 'core']); |
142 | - if($debugMode && isset($mailLogger)) { |
|
142 | + if ($debugMode && isset($mailLogger)) { |
|
143 | 143 | $this->logger->debug($mailLogger->dump(), ['app' => 'core']); |
144 | 144 | } |
145 | 145 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } |
171 | 171 | |
172 | 172 | list($name, $domain) = explode('@', $email, 2); |
173 | - $domain = idn_to_ascii($domain, 0,INTL_IDNA_VARIANT_UTS46); |
|
173 | + $domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46); |
|
174 | 174 | return $name.'@'.$domain; |
175 | 175 | } |
176 | 176 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | break; |
241 | 241 | } |
242 | 242 | |
243 | - return \Swift_SendmailTransport::newInstance($binaryPath . ' -bs'); |
|
243 | + return \Swift_SendmailTransport::newInstance($binaryPath.' -bs'); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | /** |
@@ -150,7 +150,7 @@ |
||
150 | 150 | public function actionInclude($file) { |
151 | 151 | $function = function($param) use ($file) { |
152 | 152 | unset($param["_route"]); |
153 | - $_GET=array_merge($_GET, $param); |
|
153 | + $_GET = array_merge($_GET, $param); |
|
154 | 154 | unset($param); |
155 | 155 | require_once "$file"; |
156 | 156 | } ; |
@@ -122,7 +122,7 @@ |
||
122 | 122 | protected function addROWrapper() { |
123 | 123 | // FIXME: should not add storage wrappers outside of preSetup, need to find a better way |
124 | 124 | $previousLog = \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false); |
125 | - \OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) { |
|
125 | + \OC\Files\Filesystem::addStorageWrapper('readonly', function($mountPoint, $storage) { |
|
126 | 126 | return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE)); |
127 | 127 | }); |
128 | 128 | \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | <h2><?php p($l->t('Account access')) ?></h2> |
32 | 32 | <p class="info"> |
33 | 33 | <?php print_unescaped($l->t('You are about to grant %s access to your %s account.', [ |
34 | - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
34 | + '<strong>'.\OCP\Util::sanitizeHTML($_['client']).'</strong>', |
|
35 | 35 | \OCP\Util::sanitizeHTML($_['instanceName']) |
36 | 36 | ])) ?> |
37 | 37 | </p> |
@@ -58,6 +58,6 @@ discard block |
||
58 | 58 | </fieldset> |
59 | 59 | </div> |
60 | 60 | |
61 | -<?php if(empty($_['oauthState'])): ?> |
|
61 | +<?php if (empty($_['oauthState'])): ?> |
|
62 | 62 | <a id="app-token-login" class="warning" href="#"><?php p($l->t('Alternative login using app token')) ?></a> |
63 | 63 | <?php endif; ?> |
@@ -67,7 +67,7 @@ |
||
67 | 67 | ); |
68 | 68 | |
69 | 69 | $shares = $qb->execute(); |
70 | - while($share = $shares->fetch()) { |
|
70 | + while ($share = $shares->fetch()) { |
|
71 | 71 | \OC\Share\Share::unshare($share['item_type'], $share['file_source'], \OCP\Share::SHARE_TYPE_LINK, null, $share['uid_owner']); |
72 | 72 | } |
73 | 73 | $shares->closeCursor(); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $this |
38 | 38 | ->setIdentifier($invalidId) |
39 | 39 | ->setScheme(self::SCHEME_NULL) |
40 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
40 | + ->setText('Unknown auth mechanism backend '.$invalidId) |
|
41 | 41 | ; |
42 | 42 | } |
43 | 43 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function __construct(IConfig $config) { |
78 | 78 | $this->config = $config; |
79 | 79 | $cachedUsers = &$this->cachedUsers; |
80 | - $this->listen('\OC\User', 'postDelete', function ($user) use (&$cachedUsers) { |
|
80 | + $this->listen('\OC\User', 'postDelete', function($user) use (&$cachedUsers) { |
|
81 | 81 | /** @var \OC\User\User $user */ |
82 | 82 | unset($cachedUsers[$user->getUID()]); |
83 | 83 | }); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $result = $this->checkPasswordNoLogging($loginName, $password); |
194 | 194 | |
195 | 195 | if ($result === false) { |
196 | - \OC::$server->getLogger()->warning('Login failed: \''. $loginName .'\' (Remote IP: \''. \OC::$server->getRequest()->getRemoteAddress(). '\')', ['app' => 'core']); |
|
196 | + \OC::$server->getLogger()->warning('Login failed: \''.$loginName.'\' (Remote IP: \''.\OC::$server->getRequest()->getRemoteAddress().'\')', ['app' => 'core']); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | return $result; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | } |
244 | 244 | |
245 | - uasort($users, function ($a, $b) { |
|
245 | + uasort($users, function($a, $b) { |
|
246 | 246 | /** |
247 | 247 | * @var \OC\User\User $a |
248 | 248 | * @var \OC\User\User $b |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | } |
273 | 273 | |
274 | - usort($users, function ($a, $b) { |
|
274 | + usort($users, function($a, $b) { |
|
275 | 275 | /** |
276 | 276 | * @var \OC\User\User $a |
277 | 277 | * @var \OC\User\User $b |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | |
351 | 351 | $this->emit('\OC\User', 'preCreateUser', [$uid, $password]); |
352 | 352 | $state = $backend->createUser($uid, $password); |
353 | - if($state === false) { |
|
353 | + if ($state === false) { |
|
354 | 354 | throw new \InvalidArgumentException($l->t('Could not create user')); |
355 | 355 | } |
356 | 356 | $user = $this->getUserObject($uid, $backend); |
@@ -376,13 +376,13 @@ discard block |
||
376 | 376 | foreach ($this->backends as $backend) { |
377 | 377 | if ($backend->implementsActions(Backend::COUNT_USERS)) { |
378 | 378 | $backendUsers = $backend->countUsers(); |
379 | - if($backendUsers !== false) { |
|
380 | - if($backend instanceof IUserBackend) { |
|
379 | + if ($backendUsers !== false) { |
|
380 | + if ($backend instanceof IUserBackend) { |
|
381 | 381 | $name = $backend->getBackendName(); |
382 | 382 | } else { |
383 | 383 | $name = get_class($backend); |
384 | 384 | } |
385 | - if(isset($userCountStatistics[$name])) { |
|
385 | + if (isset($userCountStatistics[$name])) { |
|
386 | 386 | $userCountStatistics[$name] += $backendUsers; |
387 | 387 | } else { |
388 | 388 | $userCountStatistics[$name] = $backendUsers; |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | $query = $queryBuilder->execute(); |
446 | 446 | |
447 | - $result = (int)$query->fetchColumn(); |
|
447 | + $result = (int) $query->fetchColumn(); |
|
448 | 448 | $query->closeCursor(); |
449 | 449 | |
450 | 450 | return $result; |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | |
467 | 467 | $query = $queryBuilder->execute(); |
468 | 468 | |
469 | - $result = (int)$query->fetchColumn(); |
|
469 | + $result = (int) $query->fetchColumn(); |
|
470 | 470 | $query->closeCursor(); |
471 | 471 | |
472 | 472 | return $result; |