@@ -55,17 +55,17 @@ |
||
55 | 55 | |
56 | 56 | try { |
57 | 57 | $jobStartTime = time(); |
58 | - $logger->debug('Run ' . get_class($this) . ' job with ID ' . $this->getId(), ['app' => 'cron']); |
|
58 | + $logger->debug('Run '.get_class($this).' job with ID '.$this->getId(), ['app' => 'cron']); |
|
59 | 59 | $this->run($this->argument); |
60 | 60 | $timeTaken = time() - $jobStartTime; |
61 | 61 | |
62 | - $logger->debug('Finished ' . get_class($this) . ' job with ID ' . $this->getId() . ' in ' . $timeTaken . ' seconds', ['app' => 'cron']); |
|
62 | + $logger->debug('Finished '.get_class($this).' job with ID '.$this->getId().' in '.$timeTaken.' seconds', ['app' => 'cron']); |
|
63 | 63 | $jobList->setExecutionTime($this, $timeTaken); |
64 | 64 | } catch (\Exception $e) { |
65 | 65 | if ($logger) { |
66 | 66 | $logger->logException($e, [ |
67 | 67 | 'app' => 'core', |
68 | - 'message' => 'Error while running background job (class: ' . get_class($this) . ', arguments: ' . print_r($this->argument, true) . ')' |
|
68 | + 'message' => 'Error while running background job (class: '.get_class($this).', arguments: '.print_r($this->argument, true).')' |
|
69 | 69 | ]); |
70 | 70 | } |
71 | 71 | } |
@@ -107,32 +107,32 @@ discard block |
||
107 | 107 | case '{DAV:}prop': |
108 | 108 | $newProps['properties'] = array_keys($elem['value']); |
109 | 109 | break; |
110 | - case '{' . SearchPlugin::NS_Nextcloud . '}filter': |
|
110 | + case '{'.SearchPlugin::NS_Nextcloud.'}filter': |
|
111 | 111 | foreach ($elem['value'] as $subElem) { |
112 | - if ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}comp-filter') { |
|
112 | + if ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}comp-filter') { |
|
113 | 113 | if (!isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps'])) { |
114 | 114 | $newProps['filters']['comps'] = []; |
115 | 115 | } |
116 | 116 | $newProps['filters']['comps'][] = $subElem['value']; |
117 | - } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}prop-filter') { |
|
117 | + } elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}prop-filter') { |
|
118 | 118 | if (!isset($newProps['filters']['props']) || !is_array($newProps['filters']['props'])) { |
119 | 119 | $newProps['filters']['props'] = []; |
120 | 120 | } |
121 | 121 | $newProps['filters']['props'][] = $subElem['value']; |
122 | - } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}param-filter') { |
|
122 | + } elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}param-filter') { |
|
123 | 123 | if (!isset($newProps['filters']['params']) || !is_array($newProps['filters']['params'])) { |
124 | 124 | $newProps['filters']['params'] = []; |
125 | 125 | } |
126 | 126 | $newProps['filters']['params'][] = $subElem['value']; |
127 | - } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}search-term') { |
|
127 | + } elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}search-term') { |
|
128 | 128 | $newProps['filters']['search-term'] = $subElem['value']; |
129 | 129 | } |
130 | 130 | } |
131 | 131 | break; |
132 | - case '{' . SearchPlugin::NS_Nextcloud . '}limit': |
|
132 | + case '{'.SearchPlugin::NS_Nextcloud.'}limit': |
|
133 | 133 | $newProps['limit'] = $elem['value']; |
134 | 134 | break; |
135 | - case '{' . SearchPlugin::NS_Nextcloud . '}offset': |
|
135 | + case '{'.SearchPlugin::NS_Nextcloud.'}offset': |
|
136 | 136 | $newProps['offset'] = $elem['value']; |
137 | 137 | break; |
138 | 138 | |
@@ -140,21 +140,21 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | if (empty($newProps['filters'])) { |
143 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}filter element is required for this request'); |
|
143 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}filter element is required for this request'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | $propsOrParamsDefined = (!empty($newProps['filters']['props']) || !empty($newProps['filters']['params'])); |
147 | 147 | $noCompsDefined = empty($newProps['filters']['comps']); |
148 | 148 | if ($propsOrParamsDefined && $noCompsDefined) { |
149 | - throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter given without any {' . SearchPlugin::NS_Nextcloud . '}comp-filter'); |
|
149 | + throw new BadRequest('{'.SearchPlugin::NS_Nextcloud.'}prop-filter or {'.SearchPlugin::NS_Nextcloud.'}param-filter given without any {'.SearchPlugin::NS_Nextcloud.'}comp-filter'); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | if (!isset($newProps['filters']['search-term'])) { |
153 | - throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}search-term is required for this request'); |
|
153 | + throw new BadRequest('{'.SearchPlugin::NS_Nextcloud.'}search-term is required for this request'); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | if (empty($newProps['filters']['props']) && empty($newProps['filters']['params'])) { |
157 | - throw new BadRequest('At least one{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter is required for this request'); |
|
157 | + throw new BadRequest('At least one{'.SearchPlugin::NS_Nextcloud.'}prop-filter or {'.SearchPlugin::NS_Nextcloud.'}param-filter is required for this request'); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $lastConfirm = (int) \OC::$server->getSession()->get('last-password-confirm'); |
28 | 28 | if ($lastConfirm < (time() - 30 * 60 + 15)) { // allow 15 seconds delay |
29 | 29 | $l = \OC::$server->getL10N('core'); |
30 | - OC_JSON::error(array( 'data' => array( 'message' => $l->t('Password confirmation is required')))); |
|
30 | + OC_JSON::error(array('data' => array('message' => $l->t('Password confirmation is required')))); |
|
31 | 31 | exit(); |
32 | 32 | } |
33 | 33 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | exit; |
37 | 37 | } |
38 | 38 | |
39 | -$appIds = (array)$_POST['appid']; |
|
40 | -foreach($appIds as $appId) { |
|
39 | +$appIds = (array) $_POST['appid']; |
|
40 | +foreach ($appIds as $appId) { |
|
41 | 41 | $appId = OC_App::cleanAppId($appId); |
42 | 42 | OC_App::disable($appId); |
43 | 43 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * {@inheritDoc} |
28 | 28 | */ |
29 | 29 | public function getName() { |
30 | - return (string)$this->l10n->t('Groupware bundle'); |
|
30 | + return (string) $this->l10n->t('Groupware bundle'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * {@inheritDoc} |
28 | 28 | */ |
29 | 29 | public function getName() { |
30 | - return (string)$this->l10n->t('Enterprise bundle'); |
|
30 | + return (string) $this->l10n->t('Enterprise bundle'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -66,12 +66,12 @@ |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | $defaultBundle = $this->bundleFetcher->getDefaultInstallationBundle(); |
69 | - foreach($defaultBundle as $bundle) { |
|
69 | + foreach ($defaultBundle as $bundle) { |
|
70 | 70 | try { |
71 | 71 | $this->installer->installAppBundle($bundle); |
72 | 72 | $output->info('Successfully installed core app bundle.'); |
73 | 73 | } catch (\Exception $e) { |
74 | - $output->warning('Could not install core app bundle: ' . $e->getMessage()); |
|
74 | + $output->warning('Could not install core app bundle: '.$e->getMessage()); |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | } |
@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); |
132 | 132 | |
133 | 133 | $formattedCategories = [ |
134 | - ['id' => self::CAT_ALL_INSTALLED, 'ident' => 'installed', 'displayName' => (string)$this->l10n->t('Your apps')], |
|
135 | - ['id' => self::CAT_ENABLED, 'ident' => 'enabled', 'displayName' => (string)$this->l10n->t('Enabled apps')], |
|
136 | - ['id' => self::CAT_DISABLED, 'ident' => 'disabled', 'displayName' => (string)$this->l10n->t('Disabled apps')], |
|
137 | - ['id' => self::CAT_APP_BUNDLES, 'ident' => 'app-bundles', 'displayName' => (string)$this->l10n->t('App bundles')], |
|
134 | + ['id' => self::CAT_ALL_INSTALLED, 'ident' => 'installed', 'displayName' => (string) $this->l10n->t('Your apps')], |
|
135 | + ['id' => self::CAT_ENABLED, 'ident' => 'enabled', 'displayName' => (string) $this->l10n->t('Enabled apps')], |
|
136 | + ['id' => self::CAT_DISABLED, 'ident' => 'disabled', 'displayName' => (string) $this->l10n->t('Disabled apps')], |
|
137 | + ['id' => self::CAT_APP_BUNDLES, 'ident' => 'app-bundles', 'displayName' => (string) $this->l10n->t('App bundles')], |
|
138 | 138 | ]; |
139 | 139 | $categories = $this->categoryFetcher->get(); |
140 | - foreach($categories as $category) { |
|
140 | + foreach ($categories as $category) { |
|
141 | 141 | $formattedCategories[] = [ |
142 | 142 | 'id' => $category['id'], |
143 | 143 | 'ident' => $category['id'], |
@@ -167,46 +167,46 @@ discard block |
||
167 | 167 | $versionParser = new VersionParser(); |
168 | 168 | $formattedApps = []; |
169 | 169 | $apps = $this->appFetcher->get(); |
170 | - foreach($apps as $app) { |
|
170 | + foreach ($apps as $app) { |
|
171 | 171 | if (isset($app['isFeatured'])) { |
172 | 172 | $app['featured'] = $app['isFeatured']; |
173 | 173 | } |
174 | 174 | |
175 | 175 | // Skip all apps not in the requested category |
176 | 176 | $isInCategory = false; |
177 | - foreach($app['categories'] as $category) { |
|
178 | - if($category === $requestedCategory) { |
|
177 | + foreach ($app['categories'] as $category) { |
|
178 | + if ($category === $requestedCategory) { |
|
179 | 179 | $isInCategory = true; |
180 | 180 | } |
181 | 181 | } |
182 | - if(!$isInCategory) { |
|
182 | + if (!$isInCategory) { |
|
183 | 183 | continue; |
184 | 184 | } |
185 | 185 | |
186 | 186 | $nextCloudVersion = $versionParser->getVersion($app['releases'][0]['rawPlatformVersionSpec']); |
187 | 187 | $nextCloudVersionDependencies = []; |
188 | - if($nextCloudVersion->getMinimumVersion() !== '') { |
|
188 | + if ($nextCloudVersion->getMinimumVersion() !== '') { |
|
189 | 189 | $nextCloudVersionDependencies['nextcloud']['@attributes']['min-version'] = $nextCloudVersion->getMinimumVersion(); |
190 | 190 | } |
191 | - if($nextCloudVersion->getMaximumVersion() !== '') { |
|
191 | + if ($nextCloudVersion->getMaximumVersion() !== '') { |
|
192 | 192 | $nextCloudVersionDependencies['nextcloud']['@attributes']['max-version'] = $nextCloudVersion->getMaximumVersion(); |
193 | 193 | } |
194 | 194 | $phpVersion = $versionParser->getVersion($app['releases'][0]['rawPhpVersionSpec']); |
195 | 195 | $existsLocally = (\OC_App::getAppPath($app['id']) !== false) ? true : false; |
196 | 196 | $phpDependencies = []; |
197 | - if($phpVersion->getMinimumVersion() !== '') { |
|
197 | + if ($phpVersion->getMinimumVersion() !== '') { |
|
198 | 198 | $phpDependencies['php']['@attributes']['min-version'] = $phpVersion->getMinimumVersion(); |
199 | 199 | } |
200 | - if($phpVersion->getMaximumVersion() !== '') { |
|
200 | + if ($phpVersion->getMaximumVersion() !== '') { |
|
201 | 201 | $phpDependencies['php']['@attributes']['max-version'] = $phpVersion->getMaximumVersion(); |
202 | 202 | } |
203 | - if(isset($app['releases'][0]['minIntSize'])) { |
|
203 | + if (isset($app['releases'][0]['minIntSize'])) { |
|
204 | 204 | $phpDependencies['php']['@attributes']['min-int-size'] = $app['releases'][0]['minIntSize']; |
205 | 205 | } |
206 | 206 | $authors = ''; |
207 | - foreach($app['authors'] as $key => $author) { |
|
207 | + foreach ($app['authors'] as $key => $author) { |
|
208 | 208 | $authors .= $author['name']; |
209 | - if($key !== count($app['authors']) - 1) { |
|
209 | + if ($key !== count($app['authors']) - 1) { |
|
210 | 210 | $authors .= ', '; |
211 | 211 | } |
212 | 212 | } |
@@ -214,12 +214,12 @@ discard block |
||
214 | 214 | $currentLanguage = substr(\OC::$server->getL10NFactory()->findLanguage(), 0, 2); |
215 | 215 | $enabledValue = $this->config->getAppValue($app['id'], 'enabled', 'no'); |
216 | 216 | $groups = null; |
217 | - if($enabledValue !== 'no' && $enabledValue !== 'yes') { |
|
217 | + if ($enabledValue !== 'no' && $enabledValue !== 'yes') { |
|
218 | 218 | $groups = $enabledValue; |
219 | 219 | } |
220 | 220 | |
221 | 221 | $currentVersion = ''; |
222 | - if($this->appManager->isInstalled($app['id'])) { |
|
222 | + if ($this->appManager->isInstalled($app['id'])) { |
|
223 | 223 | $currentVersion = \OC_App::getAppVersion($app['id']); |
224 | 224 | } else { |
225 | 225 | $currentLanguage = $app['releases'][0]['version']; |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | |
266 | 266 | $appFetcher = \OC::$server->getAppFetcher(); |
267 | 267 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $appFetcher); |
268 | - if($newVersion && $this->appManager->isInstalled($app['id'])) { |
|
269 | - $formattedApps[count($formattedApps)-1]['update'] = $newVersion; |
|
268 | + if ($newVersion && $this->appManager->isInstalled($app['id'])) { |
|
269 | + $formattedApps[count($formattedApps) - 1]['update'] = $newVersion; |
|
270 | 270 | } |
271 | 271 | } |
272 | 272 | |
@@ -287,14 +287,14 @@ discard block |
||
287 | 287 | case 'installed': |
288 | 288 | $apps = $appClass->listAllApps(); |
289 | 289 | |
290 | - foreach($apps as $key => $app) { |
|
290 | + foreach ($apps as $key => $app) { |
|
291 | 291 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
292 | 292 | $apps[$key]['update'] = $newVersion; |
293 | 293 | } |
294 | 294 | |
295 | - usort($apps, function ($a, $b) { |
|
296 | - $a = (string)$a['name']; |
|
297 | - $b = (string)$b['name']; |
|
295 | + usort($apps, function($a, $b) { |
|
296 | + $a = (string) $a['name']; |
|
297 | + $b = (string) $b['name']; |
|
298 | 298 | if ($a === $b) { |
299 | 299 | return 0; |
300 | 300 | } |
@@ -304,18 +304,18 @@ discard block |
||
304 | 304 | // enabled apps |
305 | 305 | case 'enabled': |
306 | 306 | $apps = $appClass->listAllApps(); |
307 | - $apps = array_filter($apps, function ($app) { |
|
307 | + $apps = array_filter($apps, function($app) { |
|
308 | 308 | return $app['active']; |
309 | 309 | }); |
310 | 310 | |
311 | - foreach($apps as $key => $app) { |
|
311 | + foreach ($apps as $key => $app) { |
|
312 | 312 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
313 | 313 | $apps[$key]['update'] = $newVersion; |
314 | 314 | } |
315 | 315 | |
316 | - usort($apps, function ($a, $b) { |
|
317 | - $a = (string)$a['name']; |
|
318 | - $b = (string)$b['name']; |
|
316 | + usort($apps, function($a, $b) { |
|
317 | + $a = (string) $a['name']; |
|
318 | + $b = (string) $b['name']; |
|
319 | 319 | if ($a === $b) { |
320 | 320 | return 0; |
321 | 321 | } |
@@ -325,11 +325,11 @@ discard block |
||
325 | 325 | // disabled apps |
326 | 326 | case 'disabled': |
327 | 327 | $apps = $appClass->listAllApps(); |
328 | - $apps = array_filter($apps, function ($app) { |
|
328 | + $apps = array_filter($apps, function($app) { |
|
329 | 329 | return !$app['active']; |
330 | 330 | }); |
331 | 331 | |
332 | - $apps = array_map(function ($app) { |
|
332 | + $apps = array_map(function($app) { |
|
333 | 333 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
334 | 334 | if ($newVersion !== false) { |
335 | 335 | $app['update'] = $newVersion; |
@@ -337,9 +337,9 @@ discard block |
||
337 | 337 | return $app; |
338 | 338 | }, $apps); |
339 | 339 | |
340 | - usort($apps, function ($a, $b) { |
|
341 | - $a = (string)$a['name']; |
|
342 | - $b = (string)$b['name']; |
|
340 | + usort($apps, function($a, $b) { |
|
341 | + $a = (string) $a['name']; |
|
342 | + $b = (string) $b['name']; |
|
343 | 343 | if ($a === $b) { |
344 | 344 | return 0; |
345 | 345 | } |
@@ -349,15 +349,15 @@ discard block |
||
349 | 349 | case 'app-bundles': |
350 | 350 | $bundles = $this->bundleFetcher->getBundles(); |
351 | 351 | $apps = []; |
352 | - foreach($bundles as $bundle) { |
|
352 | + foreach ($bundles as $bundle) { |
|
353 | 353 | $newCategory = true; |
354 | 354 | $allApps = $appClass->listAllApps(); |
355 | 355 | $categories = $this->getAllCategories(); |
356 | - foreach($categories as $singleCategory) { |
|
356 | + foreach ($categories as $singleCategory) { |
|
357 | 357 | $newApps = $this->getAppsForCategory($singleCategory['id']); |
358 | - foreach($allApps as $app) { |
|
359 | - foreach($newApps as $key => $newApp) { |
|
360 | - if($app['id'] === $newApp['id']) { |
|
358 | + foreach ($allApps as $app) { |
|
359 | + foreach ($newApps as $key => $newApp) { |
|
360 | + if ($app['id'] === $newApp['id']) { |
|
361 | 361 | unset($newApps[$key]); |
362 | 362 | } |
363 | 363 | } |
@@ -365,10 +365,10 @@ discard block |
||
365 | 365 | $allApps = array_merge($allApps, $newApps); |
366 | 366 | } |
367 | 367 | |
368 | - foreach($bundle->getAppIdentifiers() as $identifier) { |
|
369 | - foreach($allApps as $app) { |
|
370 | - if($app['id'] === $identifier) { |
|
371 | - if($newCategory) { |
|
368 | + foreach ($bundle->getAppIdentifiers() as $identifier) { |
|
369 | + foreach ($allApps as $app) { |
|
370 | + if ($app['id'] === $identifier) { |
|
371 | + if ($newCategory) { |
|
372 | 372 | $app['newCategory'] = true; |
373 | 373 | $app['categoryName'] = $bundle->getName(); |
374 | 374 | } |
@@ -385,9 +385,9 @@ discard block |
||
385 | 385 | $apps = $this->getAppsForCategory($category); |
386 | 386 | |
387 | 387 | // sort by score |
388 | - usort($apps, function ($a, $b) { |
|
389 | - $a = (int)$a['score']; |
|
390 | - $b = (int)$b['score']; |
|
388 | + usort($apps, function($a, $b) { |
|
389 | + $a = (int) $a['score']; |
|
390 | + $b = (int) $b['score']; |
|
391 | 391 | if ($a === $b) { |
392 | 392 | return 0; |
393 | 393 | } |
@@ -195,38 +195,38 @@ |
||
195 | 195 | $emailVerified = isset($oldData[self::PROPERTY_EMAIL]['verified']) && $oldData[self::PROPERTY_EMAIL]['verified'] === self::VERIFIED; |
196 | 196 | |
197 | 197 | // keep old verification status if we don't have a new one |
198 | - if(!isset($newData[self::PROPERTY_TWITTER]['verified'])) { |
|
198 | + if (!isset($newData[self::PROPERTY_TWITTER]['verified'])) { |
|
199 | 199 | // keep old verification status if value didn't changed and an old value exists |
200 | 200 | $keepOldStatus = $newData[self::PROPERTY_TWITTER]['value'] === $oldData[self::PROPERTY_TWITTER]['value'] && isset($oldData[self::PROPERTY_TWITTER]['verified']); |
201 | 201 | $newData[self::PROPERTY_TWITTER]['verified'] = $keepOldStatus ? $oldData[self::PROPERTY_TWITTER]['verified'] : self::NOT_VERIFIED; |
202 | 202 | } |
203 | 203 | |
204 | - if(!isset($newData[self::PROPERTY_WEBSITE]['verified'])) { |
|
204 | + if (!isset($newData[self::PROPERTY_WEBSITE]['verified'])) { |
|
205 | 205 | // keep old verification status if value didn't changed and an old value exists |
206 | 206 | $keepOldStatus = $newData[self::PROPERTY_WEBSITE]['value'] === $oldData[self::PROPERTY_WEBSITE]['value'] && isset($oldData[self::PROPERTY_WEBSITE]['verified']); |
207 | 207 | $newData[self::PROPERTY_WEBSITE]['verified'] = $keepOldStatus ? $oldData[self::PROPERTY_WEBSITE]['verified'] : self::NOT_VERIFIED; |
208 | 208 | } |
209 | 209 | |
210 | - if(!isset($newData[self::PROPERTY_EMAIL]['verified'])) { |
|
210 | + if (!isset($newData[self::PROPERTY_EMAIL]['verified'])) { |
|
211 | 211 | // keep old verification status if value didn't changed and an old value exists |
212 | 212 | $keepOldStatus = $newData[self::PROPERTY_EMAIL]['value'] === $oldData[self::PROPERTY_EMAIL]['value'] && isset($oldData[self::PROPERTY_EMAIL]['verified']); |
213 | 213 | $newData[self::PROPERTY_EMAIL]['verified'] = $keepOldStatus ? $oldData[self::PROPERTY_EMAIL]['verified'] : self::VERIFICATION_IN_PROGRESS; |
214 | 214 | } |
215 | 215 | |
216 | 216 | // reset verification status if a value from a previously verified data was changed |
217 | - if($twitterVerified && |
|
217 | + if ($twitterVerified && |
|
218 | 218 | $oldData[self::PROPERTY_TWITTER]['value'] !== $newData[self::PROPERTY_TWITTER]['value'] |
219 | 219 | ) { |
220 | 220 | $newData[self::PROPERTY_TWITTER]['verified'] = self::NOT_VERIFIED; |
221 | 221 | } |
222 | 222 | |
223 | - if($websiteVerified && |
|
223 | + if ($websiteVerified && |
|
224 | 224 | $oldData[self::PROPERTY_WEBSITE]['value'] !== $newData[self::PROPERTY_WEBSITE]['value'] |
225 | 225 | ) { |
226 | 226 | $newData[self::PROPERTY_WEBSITE]['verified'] = self::NOT_VERIFIED; |
227 | 227 | } |
228 | 228 | |
229 | - if($emailVerified && |
|
229 | + if ($emailVerified && |
|
230 | 230 | $oldData[self::PROPERTY_EMAIL]['value'] !== $newData[self::PROPERTY_EMAIL]['value'] |
231 | 231 | ) { |
232 | 232 | $newData[self::PROPERTY_EMAIL]['verified'] = self::NOT_VERIFIED; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | return parent::connect(); |
59 | 59 | } catch (DBALException $e) { |
60 | 60 | // throw a new exception to prevent leaking info from the stacktrace |
61 | - throw new DBALException('Failed to connect to the database: ' . $e->getMessage(), $e->getCode()); |
|
61 | + throw new DBALException('Failed to connect to the database: '.$e->getMessage(), $e->getCode()); |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // 0 is the method where we use `getCallerBacktrace` |
111 | 111 | // 1 is the target method which uses the method we want to log |
112 | 112 | if (isset($traces[1])) { |
113 | - return $traces[1]['file'] . ':' . $traces[1]['line']; |
|
113 | + return $traces[1]['file'].':'.$traces[1]['line']; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | return ''; |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * @param int $offset |
157 | 157 | * @return \Doctrine\DBAL\Driver\Statement The prepared statement. |
158 | 158 | */ |
159 | - public function prepare( $statement, $limit=null, $offset=null ) { |
|
159 | + public function prepare($statement, $limit = null, $offset = null) { |
|
160 | 160 | if ($limit === -1) { |
161 | 161 | $limit = null; |
162 | 162 | } |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | throw new \BadMethodCallException('Can not lock a new table until the previous lock is released.'); |
322 | 322 | } |
323 | 323 | |
324 | - $tableName = $this->tablePrefix . $tableName; |
|
324 | + $tableName = $this->tablePrefix.$tableName; |
|
325 | 325 | $this->lockedTable = $tableName; |
326 | 326 | $this->adapter->lockTable($tableName); |
327 | 327 | } |
@@ -342,11 +342,11 @@ discard block |
||
342 | 342 | * @return string |
343 | 343 | */ |
344 | 344 | public function getError() { |
345 | - $msg = $this->errorCode() . ': '; |
|
345 | + $msg = $this->errorCode().': '; |
|
346 | 346 | $errorInfo = $this->errorInfo(); |
347 | 347 | if (is_array($errorInfo)) { |
348 | - $msg .= 'SQLSTATE = '.$errorInfo[0] . ', '; |
|
349 | - $msg .= 'Driver Code = '.$errorInfo[1] . ', '; |
|
348 | + $msg .= 'SQLSTATE = '.$errorInfo[0].', '; |
|
349 | + $msg .= 'Driver Code = '.$errorInfo[1].', '; |
|
350 | 350 | $msg .= 'Driver Message = '.$errorInfo[2]; |
351 | 351 | } |
352 | 352 | return $msg; |
@@ -358,9 +358,9 @@ discard block |
||
358 | 358 | * @param string $table table name without the prefix |
359 | 359 | */ |
360 | 360 | public function dropTable($table) { |
361 | - $table = $this->tablePrefix . trim($table); |
|
361 | + $table = $this->tablePrefix.trim($table); |
|
362 | 362 | $schema = $this->getSchemaManager(); |
363 | - if($schema->tablesExist(array($table))) { |
|
363 | + if ($schema->tablesExist(array($table))) { |
|
364 | 364 | $schema->dropTable($table); |
365 | 365 | } |
366 | 366 | } |
@@ -371,8 +371,8 @@ discard block |
||
371 | 371 | * @param string $table table name without the prefix |
372 | 372 | * @return bool |
373 | 373 | */ |
374 | - public function tableExists($table){ |
|
375 | - $table = $this->tablePrefix . trim($table); |
|
374 | + public function tableExists($table) { |
|
375 | + $table = $this->tablePrefix.trim($table); |
|
376 | 376 | $schema = $this->getSchemaManager(); |
377 | 377 | return $schema->tablesExist(array($table)); |
378 | 378 | } |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | * @return string |
384 | 384 | */ |
385 | 385 | protected function replaceTablePrefix($statement) { |
386 | - return str_replace( '*PREFIX*', $this->tablePrefix, $statement ); |
|
386 | + return str_replace('*PREFIX*', $this->tablePrefix, $statement); |
|
387 | 387 | } |
388 | 388 | |
389 | 389 | /** |