@@ -39,7 +39,7 @@ |
||
39 | 39 | /** |
40 | 40 | * Execute the controller. |
41 | 41 | * |
42 | - * @return boolean |
|
42 | + * @return boolean|null |
|
43 | 43 | * |
44 | 44 | * @since 1.0 |
45 | 45 | */ |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | ->out('1) Yes') |
63 | 63 | ->out('2) No') |
64 | 64 | ->out() |
65 | - ->out('<question>' . g11n3t('Select:') . '</question>', false); |
|
65 | + ->out('<question>'.g11n3t('Select:').'</question>', false); |
|
66 | 66 | |
67 | 67 | $in = trim($this->getApplication()->in()); |
68 | 68 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $this->out('No database found.') |
85 | 85 | ->out('Creating the database...', false); |
86 | 86 | |
87 | - $this->db->setQuery('CREATE DATABASE ' . $this->db->quoteName($this->getApplication()->get('database.name'))) |
|
87 | + $this->db->setQuery('CREATE DATABASE '.$this->db->quoteName($this->getApplication()->get('database.name'))) |
|
88 | 88 | ->execute(); |
89 | 89 | |
90 | 90 | $this->db->select($this->getApplication()->get('database.name')); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $dbType = 'mysql'; |
153 | 153 | } |
154 | 154 | |
155 | - $fName = APPROOT . '/etc/' . $dbType . '.sql'; |
|
155 | + $fName = APPROOT.'/etc/'.$dbType.'.sql'; |
|
156 | 156 | |
157 | 157 | if (!file_exists($fName)) |
158 | 158 | { |
@@ -75,8 +75,7 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | $this->cleanDatabase($tables); |
78 | - } |
|
79 | - catch (\RuntimeException $e) |
|
78 | + } catch (\RuntimeException $e) |
|
80 | 79 | { |
81 | 80 | // Check if the message is "Could not connect to database." Odds are, this means the DB isn't there or the server is down. |
82 | 81 | if (strpos($e->getMessage(), 'Could not connect to database.') !== false) |
@@ -90,8 +89,7 @@ discard block |
||
90 | 89 | $this->db->select($this->getApplication()->get('database.name')); |
91 | 90 | |
92 | 91 | $this->out('<info>Database created.</info>'); |
93 | - } |
|
94 | - else |
|
92 | + } else |
|
95 | 93 | { |
96 | 94 | throw $e; |
97 | 95 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $container->alias(CliApplication::class, JoomlaApplication\AbstractCliApplication::class) |
49 | 49 | ->share( |
50 | 50 | JoomlaApplication\AbstractCliApplication::class, |
51 | - function (Container $container) |
|
51 | + function(Container $container) |
|
52 | 52 | { |
53 | 53 | $application = new CliApplication( |
54 | 54 | $container->get(Cli::class), |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $container->alias(WebApplication::class, JoomlaApplication\AbstractWebApplication::class) |
70 | 70 | ->share( |
71 | 71 | JoomlaApplication\AbstractWebApplication::class, |
72 | - function (Container $container) |
|
72 | + function(Container $container) |
|
73 | 73 | { |
74 | 74 | $application = new WebApplication($container->get(Input::class), $container->get('config')); |
75 | 75 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | $container->share( |
87 | 87 | Input::class, |
88 | - function () |
|
88 | + function() |
|
89 | 89 | { |
90 | 90 | return new Input($_REQUEST); |
91 | 91 | }, |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | $container->share( |
96 | 96 | Cli::class, |
97 | - function () |
|
97 | + function() |
|
98 | 98 | { |
99 | 99 | return new Cli; |
100 | 100 | }, |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | $container->share( |
105 | 105 | Console::class, |
106 | - function (Container $container) |
|
106 | + function(Container $container) |
|
107 | 107 | { |
108 | 108 | $console = new Console; |
109 | 109 | $console->setContainer($container); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | $container->share( |
116 | 116 | JoomlaApplication\Cli\Output\Processor\ColorProcessor::class, |
117 | - function (Container $container) |
|
117 | + function(Container $container) |
|
118 | 118 | { |
119 | 119 | $processor = new JoomlaApplication\Cli\Output\Processor\ColorProcessor; |
120 | 120 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $container->alias(JoomlaApplication\Cli\CliOutput::class, JoomlaApplication\Cli\Output\Stdout::class) |
137 | 137 | ->share( |
138 | 138 | JoomlaApplication\Cli\Output\Stdout::class, |
139 | - function (Container $container) |
|
139 | + function(Container $container) |
|
140 | 140 | { |
141 | 141 | return new JoomlaApplication\Cli\Output\Stdout($container->get(JoomlaApplication\Cli\Output\Processor\ColorProcessor::class)); |
142 | 142 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | $container->share( |
146 | 146 | Analytics::class, |
147 | - function () |
|
147 | + function() |
|
148 | 148 | { |
149 | 149 | return new Analytics(true); |
150 | 150 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | $container->share( |
154 | 154 | Router::class, |
155 | - function (Container $container) |
|
155 | + function(Container $container) |
|
156 | 156 | { |
157 | 157 | $router = (new Router($container->get(Input::class))) |
158 | 158 | ->setContainer($container) |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | $container->share( |
170 | 170 | HelpCommand::class, |
171 | - function (Container $container) |
|
171 | + function(Container $container) |
|
172 | 172 | { |
173 | 173 | $command = new HelpCommand; |
174 | 174 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | $container->share( |
184 | 184 | InstallCommand::class, |
185 | - function (Container $container) |
|
185 | + function(Container $container) |
|
186 | 186 | { |
187 | 187 | $command = new InstallCommand($container->get(DatabaseDriver::class)); |
188 | 188 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | $container->share( |
198 | 198 | SnapshotCommand::class, |
199 | - function (Container $container) |
|
199 | + function(Container $container) |
|
200 | 200 | { |
201 | 201 | $command = new SnapshotCommand($container->get(StatsJsonView::class)); |
202 | 202 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | |
211 | 211 | $container->share( |
212 | 212 | MigrateCommand::class, |
213 | - function (Container $container) |
|
213 | + function(Container $container) |
|
214 | 214 | { |
215 | 215 | $command = new MigrateCommand($container->get(Migrations::class)); |
216 | 216 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | $container->share( |
227 | 227 | StatusCommand::class, |
228 | - function (Container $container) |
|
228 | + function(Container $container) |
|
229 | 229 | { |
230 | 230 | $command = new StatusCommand($container->get(Migrations::class)); |
231 | 231 | |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | $container->share( |
241 | 241 | DisplayControllerGet::class, |
242 | - function (Container $container) |
|
242 | + function(Container $container) |
|
243 | 243 | { |
244 | 244 | $controller = new DisplayControllerGet( |
245 | 245 | $container->get(StatsJsonView::class), |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | |
257 | 257 | $container->share( |
258 | 258 | SubmitControllerCreate::class, |
259 | - function (Container $container) |
|
259 | + function(Container $container) |
|
260 | 260 | { |
261 | 261 | $controller = new SubmitControllerCreate( |
262 | 262 | $container->get(StatsModel::class) |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | |
273 | 273 | $container->share( |
274 | 274 | SubmitControllerGet::class, |
275 | - function (Container $container) |
|
275 | + function(Container $container) |
|
276 | 276 | { |
277 | 277 | $controller = new SubmitControllerGet; |
278 | 278 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | |
287 | 287 | $container->share( |
288 | 288 | StatsModel::class, |
289 | - function (Container $container) |
|
289 | + function(Container $container) |
|
290 | 290 | { |
291 | 291 | return new StatsModel( |
292 | 292 | $container->get(DatabaseDriver::class) |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | |
298 | 298 | $container->share( |
299 | 299 | StatsJsonView::class, |
300 | - function (Container $container) |
|
300 | + function(Container $container) |
|
301 | 301 | { |
302 | 302 | return new StatsJsonView( |
303 | 303 | $container->get(StatsModel::class) |