@@ -105,8 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | ${$source}['unknown']++; |
108 | - } |
|
109 | - else |
|
108 | + } else |
|
110 | 109 | { |
111 | 110 | if (!isset(${$source}[$item[$source]])) |
112 | 111 | { |
@@ -224,8 +223,7 @@ discard block |
||
224 | 223 | } |
225 | 224 | |
226 | 225 | $data[$source]['unknown']++; |
227 | - } |
|
228 | - else |
|
226 | + } else |
|
229 | 227 | { |
230 | 228 | if (!isset($data[$source][$item[$source]])) |
231 | 229 | { |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $query = $db->getQuery(true) |
56 | 56 | ->select($column); |
57 | - } |
|
58 | - else |
|
57 | + } else |
|
59 | 58 | { |
60 | 59 | $query = $db->getQuery(true) |
61 | 60 | ->select(['php_version', 'db_type', 'db_version', 'cms_version', 'server_os']); |
@@ -74,8 +73,7 @@ discard block |
||
74 | 73 | $query->setLimit($this->batchSize, $offset); |
75 | 74 | |
76 | 75 | $db->setQuery($query); |
77 | - } |
|
78 | - else |
|
76 | + } else |
|
79 | 77 | { |
80 | 78 | $db->setQuery($query, $offset, $this->batchSize); |
81 | 79 | } |
@@ -119,8 +117,7 @@ discard block |
||
119 | 117 | if ($recordExists) |
120 | 118 | { |
121 | 119 | $db->updateObject('#__jstats', $data, ['unique_id']); |
122 | - } |
|
123 | - else |
|
120 | + } else |
|
124 | 121 | { |
125 | 122 | $db->insertObject('#__jstats', $data, ['unique_id']); |
126 | 123 | } |
@@ -57,8 +57,7 @@ |
||
57 | 57 | try |
58 | 58 | { |
59 | 59 | $this->migrations->migrateDatabase($version); |
60 | - } |
|
61 | - catch (\Exception $exception) |
|
60 | + } catch (\Exception $exception) |
|
62 | 61 | { |
63 | 62 | $this->logger->critical( |
64 | 63 | 'Error migrating database', |
@@ -78,22 +78,19 @@ |
||
78 | 78 | if ($item->isHit()) |
79 | 79 | { |
80 | 80 | $body = $item->get(); |
81 | - } |
|
82 | - else |
|
81 | + } else |
|
83 | 82 | { |
84 | 83 | $body = $this->view->render(); |
85 | 84 | |
86 | 85 | $this->cacheData($key, $body); |
87 | 86 | } |
88 | - } |
|
89 | - else |
|
87 | + } else |
|
90 | 88 | { |
91 | 89 | $body = $this->view->render(); |
92 | 90 | |
93 | 91 | $this->cacheData($key, $body); |
94 | 92 | } |
95 | - } |
|
96 | - else |
|
93 | + } else |
|
97 | 94 | { |
98 | 95 | $body = $this->view->render(); |
99 | 96 | } |
@@ -39,8 +39,7 @@ |
||
39 | 39 | try |
40 | 40 | { |
41 | 41 | $container->get(WebApplication::class)->execute(); |
42 | -} |
|
43 | -catch (\Throwable $e) |
|
42 | +} catch (\Throwable $e) |
|
44 | 43 | { |
45 | 44 | if (!headers_sent()) |
46 | 45 | { |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | try |
64 | 64 | { |
65 | 65 | $this->analytics->sendPageview(); |
66 | - } |
|
67 | - catch (\Exception $e) |
|
66 | + } catch (\Exception $e) |
|
68 | 67 | { |
69 | 68 | // Log the error for reference |
70 | 69 | $this->getLogger()->error( |
@@ -77,8 +76,7 @@ discard block |
||
77 | 76 | try |
78 | 77 | { |
79 | 78 | $this->router->getController($this->get('uri.route'))->execute(); |
80 | - } |
|
81 | - catch (\Throwable $e) |
|
79 | + } catch (\Throwable $e) |
|
82 | 80 | { |
83 | 81 | // Log the error for reference |
84 | 82 | $this->getLogger()->error( |
@@ -85,8 +85,7 @@ |
||
85 | 85 | $commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className); |
86 | 86 | } |
87 | 87 | } |
88 | - } |
|
89 | - else |
|
88 | + } else |
|
90 | 89 | { |
91 | 90 | $command = $fileInfo->getBasename('.php'); |
92 | 91 | $className = __NAMESPACE__ . "\\Commands\\$command"; |
@@ -52,8 +52,7 @@ |
||
52 | 52 | if ($status['latest']) |
53 | 53 | { |
54 | 54 | $this->getApplication()->out('<fg=green;options=bold>Your database is up-to-date.</fg=green;options=bold>'); |
55 | - } |
|
56 | - else |
|
55 | + } else |
|
57 | 56 | { |
58 | 57 | $this->getApplication()->out( |
59 | 58 | '<comment>' . sprintf('Your database is not up-to-date. You are missing %d migrations.', $status['missingMigrations']) . '</comment>' |
@@ -90,8 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | $this->cleanDatabase($tables); |
93 | - } |
|
94 | - catch (\RuntimeException $e) |
|
93 | + } catch (\RuntimeException $e) |
|
95 | 94 | { |
96 | 95 | // Check if the message is "Could not connect to database." Odds are, this means the DB isn't there or the server is down. |
97 | 96 | if (strpos($e->getMessage(), 'Could not connect to database.') !== false) |
@@ -105,8 +104,7 @@ discard block |
||
105 | 104 | $this->db->select($this->getApplication()->get('database.name')); |
106 | 105 | |
107 | 106 | $this->getApplication()->out('<info>Database created.</info>'); |
108 | - } |
|
109 | - else |
|
107 | + } else |
|
110 | 108 | { |
111 | 109 | throw $e; |
112 | 110 | } |