Completed
Push — master ( de42c7...aaf898 )
by Michael
02:30
created
www/index.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
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
 	{
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @license    http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License Version 2 or Later
7 7
  */
8 8
 
9
-require dirname(__DIR__) . '/boot.php';
9
+require dirname(__DIR__).'/boot.php';
10 10
 
11 11
 use Joomla\Application\{
12 12
 	AbstractApplication, AbstractWebApplication
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 $container = (new Container)
25 25
 	->registerServiceProvider(new ApplicationServiceProvider)
26 26
 	->registerServiceProvider(new CacheServiceProvider)
27
-	->registerServiceProvider(new ConfigServiceProvider(APPROOT . '/etc/config.json'))
27
+	->registerServiceProvider(new ConfigServiceProvider(APPROOT.'/etc/config.json'))
28 28
 	->registerServiceProvider(new DatabaseServiceProvider)
29 29
 	->registerServiceProvider(new GitHubServiceProvider)
30 30
 	->registerServiceProvider(new MonologServiceProvider);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 	$response = [
61 61
 		'error' => true,
62
-		'message' => 'An error occurred while executing the application: ' . $e->getMessage()
62
+		'message' => 'An error occurred while executing the application: '.$e->getMessage()
63 63
 	];
64 64
 
65 65
 	echo json_encode($response);
Please login to merge, or discard this patch.
src/WebApplication.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/CliApplication.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@
 block discarded – undo
89 89
 	public function outputTitle(string $title, string $subTitle = '', int $width = 60) : CliApplication
90 90
 	{
91 91
 		$this->out(str_repeat('-', $width));
92
-		$this->out(str_repeat(' ', $width / 2 - (strlen($title) / 2)) . '<title>' . $title . '</title>');
92
+		$this->out(str_repeat(' ', $width / 2 - (strlen($title) / 2)).'<title>'.$title.'</title>');
93 93
 
94 94
 		if ($subTitle)
95 95
 		{
96
-			$this->out(str_repeat(' ', $width / 2 - (strlen($subTitle) / 2)) . '<b>' . $subTitle . '</b>');
96
+			$this->out(str_repeat(' ', $width / 2 - (strlen($subTitle) / 2)).'<b>'.$subTitle.'</b>');
97 97
 		}
98 98
 
99 99
 		$this->out(str_repeat('-', $width));
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
33 33
 	/**
34 34
 	 * CliApplication constructor.
35 35
 	 *
36
-	 * @param   Input\Cli  $input     The application's input object.
36
+	 * @param   Cli  $input     The application's input object.
37 37
 	 * @param   Registry   $config    The application's configuration.
38
-	 * @param   CliOutput  $output    The application's output object.
39
-	 * @param   CliInput   $cliInput  The application's CLI input handler.
38
+	 * @param   \Joomla\Application\Cli\CliOutput  $output    The application's output object.
39
+	 * @param   \Joomla\Application\Cli\CliInput   $cliInput  The application's CLI input handler.
40 40
 	 * @param   Console    $console   The application's console object.
41 41
 	 */
42 42
 	public function __construct(Cli $input, Registry $config, CliOutput $output, CliInput $cliInput, Console $console)
Please login to merge, or discard this patch.
src/Database/Migrations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
 	 */
162 162
 	private function doMigration(string $version)
163 163
 	{
164
-		$sqlFile = 'migrations/' . $version . '.sql';
164
+		$sqlFile = 'migrations/'.$version.'.sql';
165 165
 
166 166
 		if (!$this->filesystem->has($sqlFile))
167 167
 		{
Please login to merge, or discard this patch.
src/Providers/ApplicationServiceProvider.php 1 patch
Doc Comments   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	/**
42 42
 	 * Registers the service provider with a DI container.
43 43
 	 *
44
-	 * @param   Container  $container  The DI container.
44
+	 * @param   \Joomla\DI\Container  $container  The DI container.
45 45
 	 *
46 46
 	 * @return  void
47 47
 	 *
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	/**
108 108
 	 * Get the Analytics class service
109 109
 	 *
110
-	 * @param   Container  $container  The DI container.
110
+	 * @param   \Joomla\DI\Container  $container  The DI container.
111 111
 	 *
112 112
 	 * @return  Analytics
113 113
 	 *
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	/**
122 122
 	 * Get the Cache\ClearCommand class service
123 123
 	 *
124
-	 * @param   Container  $container  The DI container.
124
+	 * @param   \Joomla\DI\Container  $container  The DI container.
125 125
 	 *
126 126
 	 * @return  AppCommands\Cache\ClearCommand
127 127
 	 *
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
 	/**
141 141
 	 * Get the CLI application service
142 142
 	 *
143
-	 * @param   Container  $container  The DI container.
143
+	 * @param   \Joomla\DI\Container  $container  The DI container.
144 144
 	 *
145
-	 * @return  CliApplication
145
+	 * @return  \Joomla\StatsServer\CliApplication
146 146
 	 *
147 147
 	 * @since   1.0
148 148
 	 */
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	/**
166 166
 	 * Get the CliInput class service
167 167
 	 *
168
-	 * @param   Container  $container  The DI container.
168
+	 * @param   \Joomla\DI\Container  $container  The DI container.
169 169
 	 *
170 170
 	 * @return  JoomlaApplication\Cli\CliInput
171 171
 	 *
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	/**
180 180
 	 * Get the CliOutput class service
181 181
 	 *
182
-	 * @param   Container  $container  The DI container.
182
+	 * @param   \Joomla\DI\Container  $container  The DI container.
183 183
 	 *
184 184
 	 * @return  JoomlaApplication\Cli\CliOutput
185 185
 	 *
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	/**
194 194
 	 * Get the ColorProcessor class service
195 195
 	 *
196
-	 * @param   Container  $container  The DI container.
196
+	 * @param   \Joomla\DI\Container  $container  The DI container.
197 197
 	 *
198 198
 	 * @return  JoomlaApplication\Cli\Output\Processor\ColorProcessor
199 199
 	 *
@@ -220,9 +220,9 @@  discard block
 block discarded – undo
220 220
 	/**
221 221
 	 * Get the console service
222 222
 	 *
223
-	 * @param   Container  $container  The DI container.
223
+	 * @param   \Joomla\DI\Container  $container  The DI container.
224 224
 	 *
225
-	 * @return  Console
225
+	 * @return  \Joomla\StatsServer\Console
226 226
 	 *
227 227
 	 * @since   1.0
228 228
 	 */
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	/**
238 238
 	 * Get the Database\MigrateCommand class service
239 239
 	 *
240
-	 * @param   Container  $container  The DI container.
240
+	 * @param   \Joomla\DI\Container  $container  The DI container.
241 241
 	 *
242 242
 	 * @return  AppCommands\Database\MigrateCommand
243 243
 	 *
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	/**
258 258
 	 * Get the Database\StatusCommand class service
259 259
 	 *
260
-	 * @param   Container  $container  The DI container.
260
+	 * @param   \Joomla\DI\Container  $container  The DI container.
261 261
 	 *
262 262
 	 * @return  AppCommands\Database\StatusCommand
263 263
 	 *
@@ -276,9 +276,9 @@  discard block
 block discarded – undo
276 276
 	/**
277 277
 	 * Get the DisplayControllerGet class service
278 278
 	 *
279
-	 * @param   Container  $container  The DI container.
279
+	 * @param   \Joomla\DI\Container  $container  The DI container.
280 280
 	 *
281
-	 * @return  DisplayControllerGet
281
+	 * @return  \Joomla\StatsServer\Controllers\DisplayControllerGet
282 282
 	 *
283 283
 	 * @since   1.0
284 284
 	 */
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 	/**
299 299
 	 * Get the HelpCommand class service
300 300
 	 *
301
-	 * @param   Container  $container  The DI container.
301
+	 * @param   \Joomla\DI\Container  $container  The DI container.
302 302
 	 *
303 303
 	 * @return  AppCommands\HelpCommand
304 304
 	 *
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
 	/**
318 318
 	 * Get the Input\Cli class service
319 319
 	 *
320
-	 * @param   Container  $container  The DI container.
320
+	 * @param   \Joomla\DI\Container  $container  The DI container.
321 321
 	 *
322
-	 * @return  Cli
322
+	 * @return  \Joomla\Input\Cli
323 323
 	 *
324 324
 	 * @since   1.0
325 325
 	 */
@@ -331,9 +331,9 @@  discard block
 block discarded – undo
331 331
 	/**
332 332
 	 * Get the Input class service
333 333
 	 *
334
-	 * @param   Container  $container  The DI container.
334
+	 * @param   \Joomla\DI\Container  $container  The DI container.
335 335
 	 *
336
-	 * @return  Input
336
+	 * @return  \Joomla\Input\Input
337 337
 	 *
338 338
 	 * @since   1.0
339 339
 	 */
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 	/**
346 346
 	 * Get the InstallCommand class service
347 347
 	 *
348
-	 * @param   Container  $container  The DI container.
348
+	 * @param   \Joomla\DI\Container  $container  The DI container.
349 349
 	 *
350 350
 	 * @return  AppCommands\InstallCommand
351 351
 	 *
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
 	/**
365 365
 	 * Get the router service
366 366
 	 *
367
-	 * @param   Container  $container  The DI container.
367
+	 * @param   \Joomla\DI\Container  $container  The DI container.
368 368
 	 *
369
-	 * @return  Router
369
+	 * @return  \Joomla\StatsServer\Router
370 370
 	 *
371 371
 	 * @since   1.0
372 372
 	 */
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 	/**
387 387
 	 * Get the SnapshotCommand class service
388 388
 	 *
389
-	 * @param   Container  $container  The DI container.
389
+	 * @param   \Joomla\DI\Container  $container  The DI container.
390 390
 	 *
391 391
 	 * @return  AppCommands\SnapshotCommand
392 392
 	 *
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 	/**
406 406
 	 * Get the StatsJsonView class service
407 407
 	 *
408
-	 * @param   Container  $container  The DI container.
408
+	 * @param   \Joomla\DI\Container  $container  The DI container.
409 409
 	 *
410 410
 	 * @return  StatsJsonView
411 411
 	 *
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 	/**
422 422
 	 * Get the StatsModel class service
423 423
 	 *
424
-	 * @param   Container  $container  The DI container.
424
+	 * @param   \Joomla\DI\Container  $container  The DI container.
425 425
 	 *
426 426
 	 * @return  StatsModel
427 427
 	 *
@@ -437,9 +437,9 @@  discard block
 block discarded – undo
437 437
 	/**
438 438
 	 * Get the SubmitControllerCreate class service
439 439
 	 *
440
-	 * @param   Container  $container  The DI container.
440
+	 * @param   \Joomla\DI\Container  $container  The DI container.
441 441
 	 *
442
-	 * @return  SubmitControllerCreate
442
+	 * @return  \Joomla\StatsServer\Controllers\SubmitControllerCreate
443 443
 	 *
444 444
 	 * @since   1.0
445 445
 	 */
@@ -458,9 +458,9 @@  discard block
 block discarded – undo
458 458
 	/**
459 459
 	 * Get the SubmitControllerGet class service
460 460
 	 *
461
-	 * @param   Container  $container  The DI container.
461
+	 * @param   \Joomla\DI\Container  $container  The DI container.
462 462
 	 *
463
-	 * @return  SubmitControllerGet
463
+	 * @return  \Joomla\StatsServer\Controllers\SubmitControllerGet
464 464
 	 *
465 465
 	 * @since   1.0
466 466
 	 */
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 	/**
478 478
 	 * Get the Tags\JoomlaCommand class service
479 479
 	 *
480
-	 * @param   Container  $container  The DI container.
480
+	 * @param   \Joomla\DI\Container  $container  The DI container.
481 481
 	 *
482 482
 	 * @return  AppCommands\Tags\JoomlaCommand
483 483
 	 *
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 	/**
497 497
 	 * Get the Tags\PhpCommand class service
498 498
 	 *
499
-	 * @param   Container  $container  The DI container.
499
+	 * @param   \Joomla\DI\Container  $container  The DI container.
500 500
 	 *
501 501
 	 * @return  AppCommands\Tags\PhpCommand
502 502
 	 *
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 	/**
516 516
 	 * Get the UpdateCommand class service
517 517
 	 *
518
-	 * @param   Container  $container  The DI container.
518
+	 * @param   \Joomla\DI\Container  $container  The DI container.
519 519
 	 *
520 520
 	 * @return  AppCommands\UpdateCommand
521 521
 	 *
@@ -534,9 +534,9 @@  discard block
 block discarded – undo
534 534
 	/**
535 535
 	 * Get the web application service
536 536
 	 *
537
-	 * @param   Container  $container  The DI container.
537
+	 * @param   \Joomla\DI\Container  $container  The DI container.
538 538
 	 *
539
-	 * @return  WebApplication
539
+	 * @return  \Joomla\StatsServer\WebApplication
540 540
 	 *
541 541
 	 * @since   1.0
542 542
 	 */
Please login to merge, or discard this patch.
src/Providers/ConfigServiceProvider.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	/**
51 51
 	 * Registers the service provider with a DI container.
52 52
 	 *
53
-	 * @param   Container  $container  The DI container.
53
+	 * @param   \Joomla\DI\Container  $container  The DI container.
54 54
 	 *
55 55
 	 * @return  void
56 56
 	 *
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	/**
65 65
 	 * Get the `config` service
66 66
 	 *
67
-	 * @param   Container  $container  The DI container.
67
+	 * @param   \Joomla\DI\Container  $container  The DI container.
68 68
 	 *
69 69
 	 * @return  Registry
70 70
 	 *
Please login to merge, or discard this patch.
src/Commands/InstallCommand.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 					->out('1) Yes')
78 78
 					->out('2) No')
79 79
 					->out()
80
-					->out('<question>' . g11n3t('Select:') . '</question>', false);
80
+					->out('<question>'.g11n3t('Select:').'</question>', false);
81 81
 
82 82
 				$in = trim($this->getApplication()->in());
83 83
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 				$this->getApplication()->out('No database found.')
100 100
 					->out('Creating the database...', false);
101 101
 
102
-				$this->db->setQuery('CREATE DATABASE ' . $this->db->quoteName($this->getApplication()->get('database.name')))
102
+				$this->db->setQuery('CREATE DATABASE '.$this->db->quoteName($this->getApplication()->get('database.name')))
103 103
 					->execute();
104 104
 
105 105
 				$this->db->select($this->getApplication()->get('database.name'));
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	private function processSql() : InstallCommand
164 164
 	{
165
-		$fName = APPROOT . '/etc/mysql.sql';
165
+		$fName = APPROOT.'/etc/mysql.sql';
166 166
 
167 167
 		if (!file_exists($fName))
168 168
 		{
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 			}
Please login to merge, or discard this patch.