@@ -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>' |
@@ -33,10 +33,10 @@ |
||
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) |
@@ -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 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * Registers the service provider with a DI container. |
48 | 48 | * |
49 | - * @param Container $container The DI container. |
|
49 | + * @param \Joomla\DI\Container $container The DI container. |
|
50 | 50 | * |
51 | 51 | * @return void |
52 | 52 | */ |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * Get the `config` service |
60 | 60 | * |
61 | - * @param Container $container The DI container. |
|
61 | + * @param \Joomla\DI\Container $container The DI container. |
|
62 | 62 | * |
63 | 63 | * @return Registry |
64 | 64 | */ |