@@ -196,7 +196,7 @@ |
||
196 | 196 | */ |
197 | 197 | private function doMigration(string $version): void |
198 | 198 | { |
199 | - $sqlFile = $version . '.sql'; |
|
199 | + $sqlFile = $version.'.sql'; |
|
200 | 200 | |
201 | 201 | if (!$this->filesystem->has($sqlFile)) |
202 | 202 | { |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | ->select('version') |
64 | 64 | ->from('#__migrations') |
65 | 65 | )->loadColumn(); |
66 | - } |
|
67 | - catch (ExecutionFailureException $exception) |
|
66 | + } catch (ExecutionFailureException $exception) |
|
68 | 67 | { |
69 | 68 | // On PDO we're checking "42S02, 1146, Table 'XXX.#__migrations' doesn't exist" |
70 | 69 | if (strpos($exception->getMessage(), "migrations' doesn't exist") === false) |
@@ -131,8 +130,7 @@ discard block |
||
131 | 130 | ->select('version') |
132 | 131 | ->from('#__migrations') |
133 | 132 | )->loadColumn(); |
134 | - } |
|
135 | - catch (ExecutionFailureException $exception) |
|
133 | + } catch (ExecutionFailureException $exception) |
|
136 | 134 | { |
137 | 135 | // If the table does not exist, we can still try to run migrations |
138 | 136 | if (strpos($exception->getMessage(), "migrations' doesn't exist") === false) |
@@ -121,11 +121,11 @@ |
||
121 | 121 | private function loadConfiguration(): Registry |
122 | 122 | { |
123 | 123 | $registry = new Registry; |
124 | - $registry->loadFile(APPROOT . '/etc/config.dist.json'); |
|
124 | + $registry->loadFile(APPROOT.'/etc/config.dist.json'); |
|
125 | 125 | |
126 | - if (file_exists(APPROOT . '/etc/config.json')) |
|
126 | + if (file_exists(APPROOT.'/etc/config.json')) |
|
127 | 127 | { |
128 | - $registry->loadFile(APPROOT . '/etc/config.json'); |
|
128 | + $registry->loadFile(APPROOT.'/etc/config.json'); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | return $registry; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | return $this->db->setQuery( |
65 | 65 | $this->db->getQuery(true) |
66 | 66 | ->select('*') |
67 | - ->from($this->db->quoteName('#__jstats_counter_' . $column)) |
|
67 | + ->from($this->db->quoteName('#__jstats_counter_'.$column)) |
|
68 | 68 | )->loadAssocList(); |
69 | 69 | } |
70 | 70 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $return[$column] = $this->db->setQuery( |
76 | 76 | $this->db->getQuery(true) |
77 | 77 | ->select('*') |
78 | - ->from($this->db->quoteName('#__jstats_counter_' . $column)) |
|
78 | + ->from($this->db->quoteName('#__jstats_counter_'.$column)) |
|
79 | 79 | )->loadAssocList(); |
80 | 80 | } |
81 | 81 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $return[$column] = $this->db->setQuery( |
99 | 99 | $this->db->getQuery(true) |
100 | 100 | ->select($column) |
101 | - ->select('COUNT(' . $column . ') AS count') |
|
101 | + ->select('COUNT('.$column.') AS count') |
|
102 | 102 | ->from($this->db->quoteName('#__jstats')) |
103 | 103 | ->where('modified BETWEEN DATE_SUB(NOW(), INTERVAL 90 DAY) AND NOW()') |
104 | 104 | ->group($column) |
@@ -132,8 +132,7 @@ |
||
132 | 132 | if ($recordExists) |
133 | 133 | { |
134 | 134 | $this->db->updateObject('#__jstats', $data, ['unique_id']); |
135 | - } |
|
136 | - else |
|
135 | + } else |
|
137 | 136 | { |
138 | 137 | $this->db->insertObject('#__jstats', $data, ['unique_id']); |
139 | 138 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | $level = strtoupper($config->get('log.application', $config->get('log.level', 'error'))); |
91 | 91 | |
92 | - return new StreamHandler(APPROOT . '/logs/stats.log', \constant('\\Monolog\\Logger::' . $level)); |
|
92 | + return new StreamHandler(APPROOT.'/logs/stats.log', \constant('\\Monolog\\Logger::'.$level)); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | $level = strtoupper($config->get('log.database', $config->get('log.level', 'error'))); |
108 | 108 | |
109 | - return new StreamHandler(APPROOT . '/logs/stats.log', \constant('\\Monolog\\Logger::' . $level)); |
|
109 | + return new StreamHandler(APPROOT.'/logs/stats.log', \constant('\\Monolog\\Logger::'.$level)); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -135,7 +135,7 @@ |
||
135 | 135 | '/:source', |
136 | 136 | DisplayStatisticsController::class, |
137 | 137 | [ |
138 | - 'source' => '(' . implode('|', StatisticsRepository::ALLOWED_SOURCES) . ')', |
|
138 | + 'source' => '('.implode('|', StatisticsRepository::ALLOWED_SOURCES).')', |
|
139 | 139 | ] |
140 | 140 | ); |
141 | 141 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function getMigrationsFilesystemService(Container $container): Filesystem |
43 | 43 | { |
44 | - return new Filesystem(new Local(APPROOT . '/etc/migrations')); |
|
44 | + return new Filesystem(new Local(APPROOT.'/etc/migrations')); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function getSnapshotFilesystemService(Container $container): Filesystem |
55 | 55 | { |
56 | - return new Filesystem(new Local(APPROOT . '/snapshots')); |
|
56 | + return new Filesystem(new Local(APPROOT.'/snapshots')); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -65,6 +65,6 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function getVersionsFilesystemService(Container $container): Filesystem |
67 | 67 | { |
68 | - return new Filesystem(new Local(APPROOT . '/versions')); |
|
68 | + return new Filesystem(new Local(APPROOT.'/versions')); |
|
69 | 69 | } |
70 | 70 | } |
@@ -188,8 +188,7 @@ discard block |
||
188 | 188 | try |
189 | 189 | { |
190 | 190 | $validVersions = json_decode($this->filesystem->read('joomla.json'), true); |
191 | - } |
|
192 | - catch (FileNotFoundException $exception) |
|
191 | + } catch (FileNotFoundException $exception) |
|
193 | 192 | { |
194 | 193 | throw new \RuntimeException('Missing Joomla! release listing', 500, $exception); |
195 | 194 | } |
@@ -248,8 +247,7 @@ discard block |
||
248 | 247 | try |
249 | 248 | { |
250 | 249 | $validVersions = json_decode($this->filesystem->read('php.json'), true); |
251 | - } |
|
252 | - catch (FileNotFoundException $exception) |
|
250 | + } catch (FileNotFoundException $exception) |
|
253 | 251 | { |
254 | 252 | throw new \RuntimeException('Missing PHP release listing', 500, $exception); |
255 | 253 | } |