@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | \define('APPROOT', \dirname(__DIR__)); |
12 | 12 | |
13 | 13 | // Ensure we've initialized Composer |
14 | -if (!file_exists(APPROOT . '/vendor/autoload.php')) { |
|
14 | +if (!file_exists(APPROOT.'/vendor/autoload.php')) { |
|
15 | 15 | header('HTTP/1.1 500 Internal Server Error', null, 500); |
16 | 16 | header('Content-Type: application/json; charset=utf-8'); |
17 | 17 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | exit; |
27 | 27 | } |
28 | 28 | |
29 | -require APPROOT . '/vendor/autoload.php'; |
|
29 | +require APPROOT.'/vendor/autoload.php'; |
|
30 | 30 | |
31 | 31 | try { |
32 | 32 | (new \Joomla\StatsServer\Kernel\WebKernel())->run(); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | echo \json_encode( |
42 | 42 | [ |
43 | 43 | 'code' => $throwable->getCode(), |
44 | - 'message' => 'An error occurred while executing the application: ' . $throwable->getMessage(), |
|
44 | + 'message' => 'An error occurred while executing the application: '.$throwable->getMessage(), |
|
45 | 45 | 'error' => true, |
46 | 46 | ] |
47 | 47 | ); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | (isset($item['cms_version']) && $item['cms_version'] !== null) |
154 | 154 | && (isset($item['php_version']) && $item['php_version'] !== null) |
155 | 155 | ) { |
156 | - $index = $item['cms_version'] . ' - ' . $item['php_version']; |
|
156 | + $index = $item['cms_version'].' - '.$item['php_version']; |
|
157 | 157 | $cms_php_version[$index] = $item['count']; |
158 | 158 | |
159 | 159 | $this->totalItems += $item['count']; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | (isset($item['db_type']) && $item['db_type'] !== null) |
167 | 167 | && (isset($item['db_version']) && $item['db_version'] !== null) |
168 | 168 | ) { |
169 | - $index = $item['db_type'] . ' - ' . $item['db_version']; |
|
169 | + $index = $item['db_type'].' - '.$item['db_version']; |
|
170 | 170 | $db_type_version[$index] = $item['count']; |
171 | 171 | |
172 | 172 | $this->totalItems += $item['count']; |
@@ -287,12 +287,12 @@ discard block |
||
287 | 287 | break; |
288 | 288 | |
289 | 289 | case 'cms_php_version': |
290 | - $index = $item['cms_version'] . ' - ' . $item['php_version']; |
|
290 | + $index = $item['cms_version'].' - '.$item['php_version']; |
|
291 | 291 | $data[$this->source][$index] = $item['count']; |
292 | 292 | break; |
293 | 293 | |
294 | 294 | case 'db_type_version': |
295 | - $index = $item['db_type'] . ' - ' . $item['db_version']; |
|
295 | + $index = $item['db_type'].' - '.$item['db_version']; |
|
296 | 296 | $data[$this->source][$index] = $item['count']; |
297 | 297 | break; |
298 | 298 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | |
333 | 333 | foreach ($dataGroup as $row) { |
334 | 334 | $exploded = explode('.', $row['name']); |
335 | - $version = $exploded[0] . '.' . ($exploded[1] ?? '0'); |
|
335 | + $version = $exploded[0].'.'.($exploded[1] ?? '0'); |
|
336 | 336 | |
337 | 337 | // If the container does not exist, add it |
338 | 338 | if (!isset($counts[$version])) { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | $level = strtoupper($config->get('log.application', $config->get('log.level', 'error'))); |
92 | 92 | |
93 | - return new StreamHandler(APPROOT . '/logs/stats.log', \constant('\\Monolog\\Logger::' . $level)); |
|
93 | + return new StreamHandler(APPROOT.'/logs/stats.log', \constant('\\Monolog\\Logger::'.$level)); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $level = strtoupper($config->get('log.database', $config->get('log.level', 'error'))); |
109 | 109 | |
110 | - return new StreamHandler(APPROOT . '/logs/stats.log', \constant('\\Monolog\\Logger::' . $level)); |
|
110 | + return new StreamHandler(APPROOT.'/logs/stats.log', \constant('\\Monolog\\Logger::'.$level)); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function getMigrationsFilesystemService(Container $container): Filesystem |
44 | 44 | { |
45 | - return new Filesystem(new Local(APPROOT . '/etc/migrations')); |
|
45 | + return new Filesystem(new Local(APPROOT.'/etc/migrations')); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getSnapshotFilesystemService(Container $container): Filesystem |
56 | 56 | { |
57 | - return new Filesystem(new Local(APPROOT . '/snapshots')); |
|
57 | + return new Filesystem(new Local(APPROOT.'/snapshots')); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -66,6 +66,6 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getVersionsFilesystemService(Container $container): Filesystem |
68 | 68 | { |
69 | - return new Filesystem(new Local(APPROOT . '/versions')); |
|
69 | + return new Filesystem(new Local(APPROOT.'/versions')); |
|
70 | 70 | } |
71 | 71 | } |
@@ -137,7 +137,7 @@ |
||
137 | 137 | '/:source', |
138 | 138 | DisplayStatisticsController::class, |
139 | 139 | [ |
140 | - 'source' => '(' . implode('|', StatisticsRepository::ALLOWED_SOURCES) . ')', |
|
140 | + 'source' => '('.implode('|', StatisticsRepository::ALLOWED_SOURCES).')', |
|
141 | 141 | ] |
142 | 142 | ); |
143 | 143 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } catch (ProcessFailedException $e) { |
60 | 60 | $this->getApplication()->getLogger()->error('Could not execute `git pull`', ['exception' => $e]); |
61 | 61 | |
62 | - $symfonyStyle->error('Error running `git pull`: ' . $e->getMessage()); |
|
62 | + $symfonyStyle->error('Error running `git pull`: '.$e->getMessage()); |
|
63 | 63 | |
64 | 64 | return 1; |
65 | 65 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } catch (ProcessFailedException $e) { |
73 | 73 | $this->getApplication()->getLogger()->error('Could not update Composer resources', ['exception' => $e]); |
74 | 74 | |
75 | - $symfonyStyle->error('Error updating Composer resources: ' . $e->getMessage()); |
|
75 | + $symfonyStyle->error('Error updating Composer resources: '.$e->getMessage()); |
|
76 | 76 | |
77 | 77 | return 1; |
78 | 78 | } |
@@ -96,11 +96,11 @@ |
||
96 | 96 | |
97 | 97 | // Allow the next patch release after this one |
98 | 98 | $nextPatch = $explodedVersion[2] + 1; |
99 | - $versions[] = $explodedVersion[0] . '.' . $explodedVersion[1] . '.' . $nextPatch; |
|
99 | + $versions[] = $explodedVersion[0].'.'.$explodedVersion[1].'.'.$nextPatch; |
|
100 | 100 | |
101 | 101 | // And allow the next minor release after this one |
102 | 102 | $nextMinor = $explodedVersion[1] + 1; |
103 | - $versions[] = $explodedVersion[0] . '.' . $nextMinor . '.0'; |
|
103 | + $versions[] = $explodedVersion[0].'.'.$nextMinor.'.0'; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | if (!$this->filesystem->put('joomla.json', json_encode($versions))) { |
@@ -107,14 +107,14 @@ |
||
107 | 107 | $explodedVersion = explode('.', $version); |
108 | 108 | |
109 | 109 | $nextPatch = $explodedVersion[2] + 1; |
110 | - $versions[] = $explodedVersion[0] . '.' . $explodedVersion[1] . '.' . $nextPatch; |
|
110 | + $versions[] = $explodedVersion[0].'.'.$explodedVersion[1].'.'.$nextPatch; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | // Use $branch from the previous loop to allow the next minor version (PHP's master branch) |
114 | 114 | $explodedVersion = explode('.', $branch); |
115 | 115 | |
116 | 116 | $nextMinor = $explodedVersion[1] + 1; |
117 | - $nextRelease = $explodedVersion[0] . '.' . $nextMinor . '.0'; |
|
117 | + $nextRelease = $explodedVersion[0].'.'.$nextMinor.'.0'; |
|
118 | 118 | |
119 | 119 | // There won't be a PHP 7.5, change next release to 8.0 if needed |
120 | 120 | if ($nextRelease === '7.5.0') { |
@@ -93,7 +93,7 @@ |
||
93 | 93 | |
94 | 94 | $this->view->setSource($source); |
95 | 95 | |
96 | - $filename .= '_' . $source; |
|
96 | + $filename .= '_'.$source; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | if (!$this->filesystem->write($filename, $this->view->render())) { |