@@ -25,8 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | $app = $container->get(Application::class); |
| 27 | 27 | $app->execute(); |
| 28 | -} |
|
| 29 | -catch (\Exception $e) |
|
| 28 | +} catch (\Exception $e) |
|
| 30 | 29 | { |
| 31 | 30 | if (!headers_sent()) |
| 32 | 31 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $container->alias('db', DatabaseDriver::class) |
| 28 | 28 | ->share( |
| 29 | 29 | DatabaseDriver::class, |
| 30 | - function (Container $container) |
|
| 30 | + function(Container $container) |
|
| 31 | 31 | { |
| 32 | 32 | $config = $container->get('config'); |
| 33 | 33 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | { |
| 54 | 54 | $container->share( |
| 55 | 55 | 'config', |
| 56 | - function () |
|
| 56 | + function() |
|
| 57 | 57 | { |
| 58 | 58 | return $this->config; |
| 59 | 59 | }, |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | ->alias(JoomlaApplication\AbstractWebApplication::class, JoomlaApplication\AbstractApplication::class) |
| 38 | 38 | ->share( |
| 39 | 39 | JoomlaApplication\AbstractApplication::class, |
| 40 | - function (Container $container) |
|
| 40 | + function(Container $container) |
|
| 41 | 41 | { |
| 42 | 42 | $application = new Application($container->get(Input::class), $container->get('config')); |
| 43 | 43 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $container->share( |
| 54 | 54 | Input::class, |
| 55 | - function () |
|
| 55 | + function() |
|
| 56 | 56 | { |
| 57 | 57 | return new Input($_REQUEST); |
| 58 | 58 | }, |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $container->share( |
| 63 | 63 | Router::class, |
| 64 | - function (Container $container) |
|
| 64 | + function(Container $container) |
|
| 65 | 65 | { |
| 66 | 66 | $router = (new Router($container->get('Joomla\\Input\\Input'))) |
| 67 | 67 | ->setContainer($container) |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $container->share( |
| 79 | 79 | DisplayControllerGet::class, |
| 80 | - function (Container $container) |
|
| 80 | + function(Container $container) |
|
| 81 | 81 | { |
| 82 | 82 | $controller = new DisplayControllerGet( |
| 83 | 83 | $container->get(StatsJsonView::class) |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $container->share( |
| 95 | 95 | SubmitControllerCreate::class, |
| 96 | - function (Container $container) |
|
| 96 | + function(Container $container) |
|
| 97 | 97 | { |
| 98 | 98 | $controller = new SubmitControllerCreate( |
| 99 | 99 | $container->get('Stats\\Models\\StatsModel') |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | $container->share( |
| 111 | 111 | SubmitControllerGet::class, |
| 112 | - function (Container $container) |
|
| 112 | + function(Container $container) |
|
| 113 | 113 | { |
| 114 | 114 | $controller = new SubmitControllerGet; |
| 115 | 115 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | $container->share( |
| 125 | 125 | StatsModel::class, |
| 126 | - function (Container $container) |
|
| 126 | + function(Container $container) |
|
| 127 | 127 | { |
| 128 | 128 | return new StatsModel( |
| 129 | 129 | $container->get(DatabaseDriver::class) |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $container->share( |
| 136 | 136 | StatsJsonView::class, |
| 137 | - function (Container $container) |
|
| 137 | + function(Container $container) |
|
| 138 | 138 | { |
| 139 | 139 | return new StatsJsonView( |
| 140 | 140 | $container->get(StatsModel::class) |
@@ -57,8 +57,7 @@ |
||
| 57 | 57 | if ($recordExists) |
| 58 | 58 | { |
| 59 | 59 | $db->updateObject('#__jstats', $data, ['unique_id']); |
| 60 | - } |
|
| 61 | - else |
|
| 60 | + } else |
|
| 62 | 61 | { |
| 63 | 62 | $db->insertObject('#__jstats', $data, ['unique_id']); |
| 64 | 63 | } |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $controller = $this->router->getController($this->get('uri.route')); |
| 42 | 42 | $controller->execute(); |
| 43 | - } |
|
| 44 | - catch (\Exception $e) |
|
| 43 | + } catch (\Exception $e) |
|
| 45 | 44 | { |
| 46 | 45 | // Log the error for reference |
| 47 | 46 | $this->getLogger()->error( |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | // Register the PSR-3 processor |
| 32 | 32 | $container->share( |
| 33 | 33 | 'monolog.processor.psr3', |
| 34 | - function () |
|
| 34 | + function() |
|
| 35 | 35 | { |
| 36 | 36 | return new PsrLogMessageProcessor; |
| 37 | 37 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // Register the web processor |
| 41 | 41 | $container->share( |
| 42 | 42 | 'monolog.processor.web', |
| 43 | - function () |
|
| 43 | + function() |
|
| 44 | 44 | { |
| 45 | 45 | return new WebProcessor; |
| 46 | 46 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | // Register the main application handler |
| 50 | 50 | $container->share( |
| 51 | 51 | 'monolog.handler.application', |
| 52 | - function (Container $container) |
|
| 52 | + function(Container $container) |
|
| 53 | 53 | { |
| 54 | 54 | /** @var \Joomla\Registry\Registry $config */ |
| 55 | 55 | $config = $container->get('config'); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | // Register the database handler |
| 67 | 67 | $container->share( |
| 68 | 68 | 'monolog.handler.database', |
| 69 | - function (Container $container) |
|
| 69 | + function(Container $container) |
|
| 70 | 70 | { |
| 71 | 71 | /** @var \Joomla\Registry\Registry $config */ |
| 72 | 72 | $config = $container->get('config'); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | ->alias(LoggerInterface::class, Logger::class) |
| 88 | 88 | ->share( |
| 89 | 89 | Logger::class, |
| 90 | - function (Container $container) |
|
| 90 | + function(Container $container) |
|
| 91 | 91 | { |
| 92 | 92 | return new Logger( |
| 93 | 93 | 'Application', |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | // Register the database Logger |
| 105 | 105 | $container->share( |
| 106 | 106 | 'monolog.logger.database', |
| 107 | - function (Container $container) |
|
| 107 | + function(Container $container) |
|
| 108 | 108 | { |
| 109 | 109 | return new Logger( |
| 110 | 110 | 'Database', |
@@ -79,8 +79,7 @@ |
||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $data[$key]['unknown']++; |
| 82 | - } |
|
| 83 | - else |
|
| 82 | + } else |
|
| 84 | 83 | { |
| 85 | 84 | if (!isset($data[$key][$item->$key])) |
| 86 | 85 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $container->alias('db', DatabaseDriver::class) |
| 28 | 28 | ->share( |
| 29 | 29 | DatabaseDriver::class, |
| 30 | - function (Container $container) |
|
| 30 | + function(Container $container) |
|
| 31 | 31 | { |
| 32 | 32 | $config = $container->get('config'); |
| 33 | 33 | |