| @@ -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 | } | 
| @@ -57,8 +57,7 @@ | ||
| 57 | 57 | try | 
| 58 | 58 |  		{ | 
| 59 | 59 | $this->migrations->migrateDatabase($version); | 
| 60 | - } | |
| 61 | - catch (\Exception $exception) | |
| 60 | + } catch (\Exception $exception) | |
| 62 | 61 |  		{ | 
| 63 | 62 | $this->logger->critical( | 
| 64 | 63 | 'Error migrating database', | 
| @@ -39,8 +39,7 @@ | ||
| 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 |  	{ | 
| @@ -63,8 +63,7 @@ discard block | ||
| 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 | ||
| 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( | 
| @@ -85,8 +85,7 @@ | ||
| 85 | 85 |  						$commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className); | 
| 86 | 86 | } | 
| 87 | 87 | } | 
| 88 | - } | |
| 89 | - else | |
| 88 | + } else | |
| 90 | 89 |  			{ | 
| 91 | 90 |  				$command   = $fileInfo->getBasename('.php'); | 
| 92 | 91 | $className = __NAMESPACE__ . "\\Commands\\$command"; | 
| @@ -52,8 +52,7 @@ | ||
| 52 | 52 | if ($status['latest']) | 
| 53 | 53 |  		{ | 
| 54 | 54 |  			$this->getApplication()->out('<fg=green;options=bold>Your database is up-to-date.</fg=green;options=bold>'); | 
| 55 | - } | |
| 56 | - else | |
| 55 | + } else | |
| 57 | 56 |  		{ | 
| 58 | 57 | $this->getApplication()->out( | 
| 59 | 58 |  				'<comment>' . sprintf('Your database is not up-to-date. You are missing %d migrations.', $status['missingMigrations']) . '</comment>' | 
| @@ -90,8 +90,7 @@ discard block | ||
| 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 | ||
| 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 | } | 
| @@ -95,8 +95,7 @@ | ||
| 95 | 95 | if ($this->recent) | 
| 96 | 96 |  		{ | 
| 97 | 97 | $items = $this->model->getRecentlyUpdatedItems(); | 
| 98 | - } | |
| 99 | - else | |
| 98 | + } else | |
| 100 | 99 |  		{ | 
| 101 | 100 | $items = $this->model->getItems($this->source); | 
| 102 | 101 | } |