| @@ -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 |  	{ | 
| @@ -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 | } | 
| @@ -2,7 +2,6 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Stats\Models; | 
| 4 | 4 | |
| 5 | -use Joomla\Database\Query\LimitableInterface; | |
| 6 | 5 | use Joomla\Model\AbstractDatabaseModel; | 
| 7 | 6 | |
| 8 | 7 | /** | 
| @@ -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 | } | 
| @@ -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 | |
| @@ -8,7 +8,6 @@ | ||
| 8 | 8 | use Monolog\Logger; | 
| 9 | 9 | use Monolog\Processor\PsrLogMessageProcessor; | 
| 10 | 10 | use Monolog\Processor\WebProcessor; | 
| 11 | -use Psr\Log\LoggerInterface; | |
| 12 | 11 | |
| 13 | 12 | /** | 
| 14 | 13 | * Monolog service provider | 
| @@ -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( |