@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | const APPROOT = __DIR__; |
4 | 4 | |
5 | -$composerPath = APPROOT . '/vendor/autoload.php'; |
|
5 | +$composerPath = APPROOT.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | if (!file_exists($composerPath)) |
8 | 8 | { |
9 | 9 | throw new RuntimeException('Composer is not set up, please run "composer install".'); |
10 | 10 | } |
11 | 11 | |
12 | -require APPROOT . '/vendor/autoload.php'; |
|
12 | +require APPROOT.'/vendor/autoload.php'; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require dirname(__DIR__) . '/boot.php'; |
|
3 | +require dirname(__DIR__).'/boot.php'; |
|
4 | 4 | |
5 | 5 | use Joomla\Application\AbstractApplication; |
6 | 6 | use Joomla\Application\AbstractWebApplication; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $container = (new Container) |
18 | 18 | ->registerServiceProvider(new ApplicationServiceProvider) |
19 | 19 | ->registerServiceProvider(new CacheServiceProvider) |
20 | - ->registerServiceProvider(new ConfigServiceProvider(APPROOT . '/etc/config.json')) |
|
20 | + ->registerServiceProvider(new ConfigServiceProvider(APPROOT.'/etc/config.json')) |
|
21 | 21 | ->registerServiceProvider(new DatabaseServiceProvider) |
22 | 22 | ->registerServiceProvider(new MonologServiceProvider); |
23 | 23 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $response = [ |
50 | 50 | 'error' => true, |
51 | - 'message' => 'An error occurred while executing the application: ' . $e->getMessage() |
|
51 | + 'message' => 'An error occurred while executing the application: '.$e->getMessage() |
|
52 | 52 | ]; |
53 | 53 | |
54 | 54 | echo json_encode($response); |
@@ -67,7 +67,7 @@ |
||
67 | 67 | // Serve cached data if the cache layer is enabled and the raw data source is not requested |
68 | 68 | if ($this->getApplication()->get('cache.enabled', false) && !$authorizedRaw) |
69 | 69 | { |
70 | - $key = md5(get_class($this->view) . __METHOD__ . $source); |
|
70 | + $key = md5(get_class($this->view).__METHOD__.$source); |
|
71 | 71 | |
72 | 72 | if ($this->cache->contains($key)) |
73 | 73 | { |
@@ -91,11 +91,11 @@ |
||
91 | 91 | public function outputTitle($title, $subTitle = '', $width = 60) |
92 | 92 | { |
93 | 93 | $this->out(str_repeat('-', $width)); |
94 | - $this->out(str_repeat(' ', $width / 2 - (strlen($title) / 2)) . '<title>' . $title . '</title>'); |
|
94 | + $this->out(str_repeat(' ', $width / 2 - (strlen($title) / 2)).'<title>'.$title.'</title>'); |
|
95 | 95 | |
96 | 96 | if ($subTitle) |
97 | 97 | { |
98 | - $this->out(str_repeat(' ', $width / 2 - (strlen($subTitle) / 2)) . '<b>' . $subTitle . '</b>'); |
|
98 | + $this->out(str_repeat(' ', $width / 2 - (strlen($subTitle) / 2)).'<b>'.$subTitle.'</b>'); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $this->out(str_repeat('-', $width)); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | protected function fetchController($name) |
30 | 30 | { |
31 | 31 | // Derive the controller class name. |
32 | - $class = $this->controllerPrefix . ucfirst($name); |
|
32 | + $class = $this->controllerPrefix.ucfirst($name); |
|
33 | 33 | |
34 | 34 | // If the controller class does not exist panic. |
35 | 35 | if (!class_exists($class)) |
@@ -48,11 +48,11 @@ |
||
48 | 48 | |
49 | 49 | foreach ($this->getApplication()->getConsole()->getCommands() as $cName => $command) |
50 | 50 | { |
51 | - $this->getApplication()->out('<cmd>' . $cName . '</cmd>'); |
|
51 | + $this->getApplication()->out('<cmd>'.$cName.'</cmd>'); |
|
52 | 52 | |
53 | 53 | if ($command->getDescription()) |
54 | 54 | { |
55 | - $this->getApplication()->out(' ' . $command->getDescription()); |
|
55 | + $this->getApplication()->out(' '.$command->getDescription()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | $this->getApplication()->out(); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function __construct(StatsJsonView $view) |
35 | 35 | { |
36 | - $this->view = $view; |
|
36 | + $this->view = $view; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | // We want the full raw data set for our snapshot |
51 | 51 | $this->view->isAuthorizedRaw(true); |
52 | 52 | |
53 | - $file = APPROOT . '/snapshots/' . date('YmdHis'); |
|
53 | + $file = APPROOT.'/snapshots/'.date('YmdHis'); |
|
54 | 54 | |
55 | 55 | if (!file_put_contents($file, $this->view->render())) |
56 | 56 | { |
57 | - throw new \RuntimeException('Failed writing snapshot to the filesystem at ' . $file); |
|
57 | + throw new \RuntimeException('Failed writing snapshot to the filesystem at '.$file); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $this->getApplication()->out('<info>Snapshot successfully recorded.</info>'); |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $db->getQuery(true) |
93 | 93 | ->select('unique_id') |
94 | 94 | ->from('#__jstats') |
95 | - ->where('unique_id = ' . $db->quote($data->unique_id)) |
|
95 | + ->where('unique_id = '.$db->quote($data->unique_id)) |
|
96 | 96 | )->loadResult(); |
97 | 97 | |
98 | 98 | if ($recordExists) |
@@ -263,7 +263,7 @@ |
||
263 | 263 | foreach ($dataGroup as $row) |
264 | 264 | { |
265 | 265 | $exploded = explode('.', $row['name']); |
266 | - $version = $exploded[0] . '.' . (isset($exploded[1]) ? $exploded[1] : '0'); |
|
266 | + $version = $exploded[0].'.'.(isset($exploded[1]) ? $exploded[1] : '0'); |
|
267 | 267 | |
268 | 268 | // If the container does not exist, add it |
269 | 269 | if (!isset($counts[$version])) |