@@ -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 | }, |
@@ -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 |
@@ -72,15 +72,13 @@ |
||
72 | 72 | if ($this->cache->contains($key)) |
73 | 73 | { |
74 | 74 | $body = $this->cache->fetch($key); |
75 | - } |
|
76 | - else |
|
75 | + } else |
|
77 | 76 | { |
78 | 77 | $body = $this->view->render(); |
79 | 78 | |
80 | 79 | $this->cache->save($key, $body, $this->getApplication()->get('cache.lifetime', 900)); |
81 | 80 | } |
82 | - } |
|
83 | - else |
|
81 | + } else |
|
84 | 82 | { |
85 | 83 | $body = $this->view->render(); |
86 | 84 | } |
@@ -34,8 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | throw new \InvalidArgumentException('An invalid data source was requested.', 404); |
36 | 36 | } |
37 | - } |
|
38 | - else |
|
37 | + } else |
|
39 | 38 | { |
40 | 39 | $column = '*'; |
41 | 40 | } |
@@ -75,8 +74,7 @@ discard block |
||
75 | 74 | if ($recordExists) |
76 | 75 | { |
77 | 76 | $db->updateObject('#__jstats', $data, ['unique_id']); |
78 | - } |
|
79 | - else |
|
77 | + } else |
|
80 | 78 | { |
81 | 79 | $db->insertObject('#__jstats', $data, ['unique_id']); |
82 | 80 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * CliApplication constructor. |
31 | 31 | * |
32 | - * @param Input\Cli $input The application's input object. |
|
32 | + * @param Cli $input The application's input object. |
|
33 | 33 | * @param Registry $config The application's configuration. |
34 | 34 | * @param CliOutput $output The application's output object. |
35 | 35 | * @param Console $console The application's console object. |
@@ -2,9 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Stats; |
4 | 4 | |
5 | -use Joomla\Application\Cli\ColorStyle; |
|
6 | -use Joomla\Application\Cli\Output\Processor\ColorProcessor; |
|
7 | -use Joomla\Controller\AbstractController; |
|
8 | 5 | use Joomla\DI\ContainerAwareInterface; |
9 | 6 | use Joomla\DI\ContainerAwareTrait; |
10 | 7 |