@@ -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) |
@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | ); |
54 | 54 | |
55 | 55 | yield $db->loadAssocList(); |
56 | - } |
|
57 | - else |
|
56 | + } else |
|
58 | 57 | { |
59 | 58 | // If fetching all data from the table, we need to break this down a fair bit otherwise we're going to run out of memory |
60 | 59 | $totalRecords = $db->setQuery( |
@@ -80,8 +79,7 @@ discard block |
||
80 | 79 | $query->setLimit($this->batchSize, $offset); |
81 | 80 | |
82 | 81 | $db->setQuery($query); |
83 | - } |
|
84 | - else |
|
82 | + } else |
|
85 | 83 | { |
86 | 84 | $db->setQuery($query, $offset, $this->batchSize); |
87 | 85 | } |
@@ -126,8 +124,7 @@ discard block |
||
126 | 124 | if ($recordExists) |
127 | 125 | { |
128 | 126 | $db->updateObject('#__jstats', $data, ['unique_id']); |
129 | - } |
|
130 | - else |
|
127 | + } else |
|
131 | 128 | { |
132 | 129 | $db->insertObject('#__jstats', $data, ['unique_id']); |
133 | 130 | } |
@@ -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])) |
@@ -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 | { |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | try |
62 | 62 | { |
63 | 63 | $this->analytics->sendPageview(); |
64 | - } |
|
65 | - catch (\Exception $e) |
|
64 | + } catch (\Exception $e) |
|
66 | 65 | { |
67 | 66 | // Log the error for reference |
68 | 67 | $this->getLogger()->error( |
@@ -75,8 +74,7 @@ discard block |
||
75 | 74 | try |
76 | 75 | { |
77 | 76 | $this->router->getController($this->get('uri.route'))->execute(); |
78 | - } |
|
79 | - catch (\Exception $e) |
|
77 | + } catch (\Exception $e) |
|
80 | 78 | { |
81 | 79 | // Log the error for reference |
82 | 80 | $this->getLogger()->error( |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $container->alias(CliApplication::class, JoomlaApplication\AbstractCliApplication::class) |
44 | 44 | ->share( |
45 | 45 | JoomlaApplication\AbstractCliApplication::class, |
46 | - function (Container $container) |
|
46 | + function(Container $container) |
|
47 | 47 | { |
48 | 48 | $application = new CliApplication( |
49 | 49 | $container->get(Cli::class), |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $container->alias(WebApplication::class, JoomlaApplication\AbstractWebApplication::class) |
65 | 65 | ->share( |
66 | 66 | JoomlaApplication\AbstractWebApplication::class, |
67 | - function (Container $container) |
|
67 | + function(Container $container) |
|
68 | 68 | { |
69 | 69 | $application = new WebApplication($container->get(Input::class), $container->get('config')); |
70 | 70 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | $container->share( |
82 | 82 | Input::class, |
83 | - function () |
|
83 | + function() |
|
84 | 84 | { |
85 | 85 | return new Input($_REQUEST); |
86 | 86 | }, |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | $container->share( |
91 | 91 | Cli::class, |
92 | - function () |
|
92 | + function() |
|
93 | 93 | { |
94 | 94 | return new Cli; |
95 | 95 | }, |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $container->share( |
100 | 100 | Console::class, |
101 | - function (Container $container) |
|
101 | + function(Container $container) |
|
102 | 102 | { |
103 | 103 | $console = new Console; |
104 | 104 | $console->setContainer($container); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $container->share( |
111 | 111 | JoomlaApplication\Cli\Output\Processor\ColorProcessor::class, |
112 | - function (Container $container) |
|
112 | + function(Container $container) |
|
113 | 113 | { |
114 | 114 | $processor = new JoomlaApplication\Cli\Output\Processor\ColorProcessor; |
115 | 115 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $container->alias(JoomlaApplication\Cli\CliOutput::class, JoomlaApplication\Cli\Output\Stdout::class) |
132 | 132 | ->share( |
133 | 133 | JoomlaApplication\Cli\Output\Stdout::class, |
134 | - function (Container $container) |
|
134 | + function(Container $container) |
|
135 | 135 | { |
136 | 136 | return new JoomlaApplication\Cli\Output\Stdout($container->get(JoomlaApplication\Cli\Output\Processor\ColorProcessor::class)); |
137 | 137 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $container->share( |
141 | 141 | Analytics::class, |
142 | - function () |
|
142 | + function() |
|
143 | 143 | { |
144 | 144 | return new Analytics(true); |
145 | 145 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | $container->share( |
149 | 149 | Router::class, |
150 | - function (Container $container) |
|
150 | + function(Container $container) |
|
151 | 151 | { |
152 | 152 | $router = (new Router($container->get(Input::class))) |
153 | 153 | ->setContainer($container) |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | $container->share( |
165 | 165 | HelpCommand::class, |
166 | - function (Container $container) |
|
166 | + function(Container $container) |
|
167 | 167 | { |
168 | 168 | $command = new HelpCommand; |
169 | 169 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | $container->share( |
179 | 179 | SnapshotCommand::class, |
180 | - function (Container $container) |
|
180 | + function(Container $container) |
|
181 | 181 | { |
182 | 182 | $command = new SnapshotCommand($container->get(StatsJsonView::class)); |
183 | 183 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | $container->share( |
193 | 193 | DisplayControllerGet::class, |
194 | - function (Container $container) |
|
194 | + function(Container $container) |
|
195 | 195 | { |
196 | 196 | $controller = new DisplayControllerGet( |
197 | 197 | $container->get(StatsJsonView::class), |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | $container->share( |
210 | 210 | SubmitControllerCreate::class, |
211 | - function (Container $container) |
|
211 | + function(Container $container) |
|
212 | 212 | { |
213 | 213 | $controller = new SubmitControllerCreate( |
214 | 214 | $container->get(StatsModel::class) |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | $container->share( |
226 | 226 | SubmitControllerGet::class, |
227 | - function (Container $container) |
|
227 | + function(Container $container) |
|
228 | 228 | { |
229 | 229 | $controller = new SubmitControllerGet; |
230 | 230 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | $container->share( |
240 | 240 | StatsModel::class, |
241 | - function (Container $container) |
|
241 | + function(Container $container) |
|
242 | 242 | { |
243 | 243 | return new StatsModel( |
244 | 244 | $container->get(DatabaseDriver::class) |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | |
250 | 250 | $container->share( |
251 | 251 | StatsJsonView::class, |
252 | - function (Container $container) |
|
252 | + function(Container $container) |
|
253 | 253 | { |
254 | 254 | return new StatsJsonView( |
255 | 255 | $container->get(StatsModel::class) |