@@ -92,7 +92,7 @@ |
||
| 92 | 92 | $db->getQuery(true) |
| 93 | 93 | ->select('unique_id') |
| 94 | 94 | ->from('#__jstats') |
| 95 | - ->where('unique_id = ' . $db->quote($data->unique_id)) |
|
| 95 | + ->where('unique_id = '.$db->quote($data->unique_id)) |
|
| 96 | 96 | )->loadResult(); |
| 97 | 97 | |
| 98 | 98 | if ($recordExists) |
@@ -263,7 +263,7 @@ |
||
| 263 | 263 | foreach ($dataGroup as $row) |
| 264 | 264 | { |
| 265 | 265 | $exploded = explode('.', $row['name']); |
| 266 | - $version = $exploded[0] . '.' . (isset($exploded[1]) ? $exploded[1] : '0'); |
|
| 266 | + $version = $exploded[0].'.'.(isset($exploded[1]) ? $exploded[1] : '0'); |
|
| 267 | 267 | |
| 268 | 268 | // If the container does not exist, add it |
| 269 | 269 | if (!isset($counts[$version])) |
@@ -56,11 +56,11 @@ |
||
| 56 | 56 | else |
| 57 | 57 | { |
| 58 | 58 | $this->getApplication()->out( |
| 59 | - '<comment>' . sprintf('Your database is not up-to-date. You are missing %d migrations.', $status['missingMigrations']) . '</comment>' |
|
| 59 | + '<comment>'.sprintf('Your database is not up-to-date. You are missing %d migrations.', $status['missingMigrations']).'</comment>' |
|
| 60 | 60 | ) |
| 61 | 61 | ->out() |
| 62 | - ->out('<comment>' . sprintf('Current Version: %1$s', $status['currentVersion']) . '</comment>') |
|
| 63 | - ->out('<comment>' . sprintf('Latest Version: %1$s', $status['latestVersion']) . '</comment>') |
|
| 62 | + ->out('<comment>'.sprintf('Current Version: %1$s', $status['currentVersion']).'</comment>') |
|
| 63 | + ->out('<comment>'.sprintf('Latest Version: %1$s', $status['latestVersion']).'</comment>') |
|
| 64 | 64 | ->out() |
| 65 | 65 | ->out(sprintf('To update, run the <fg=magenta>%1$s</fg=magenta> command.', 'database:migrate')); |
| 66 | 66 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $commands = []; |
| 56 | 56 | |
| 57 | 57 | /** @var \DirectoryIterator $fileInfo */ |
| 58 | - foreach (new \DirectoryIterator(__DIR__ . '/Commands') as $fileInfo) |
|
| 58 | + foreach (new \DirectoryIterator(__DIR__.'/Commands') as $fileInfo) |
|
| 59 | 59 | { |
| 60 | 60 | if ($fileInfo->isDot()) |
| 61 | 61 | { |
@@ -75,20 +75,20 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $command = $subFileInfo->getBasename('.php'); |
| 78 | - $className = __NAMESPACE__ . "\\Commands\\$namespace\\$command"; |
|
| 78 | + $className = __NAMESPACE__."\\Commands\\$namespace\\$command"; |
|
| 79 | 79 | |
| 80 | 80 | if (!class_exists($className)) |
| 81 | 81 | { |
| 82 | 82 | throw new \RuntimeException(sprintf('Required class "%s" not found.', $className)); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - $commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className); |
|
| 85 | + $commands[strtolower("$namespace:".str_replace('Command', '', $command))] = $this->getContainer()->get($className); |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | else |
| 89 | 89 | { |
| 90 | 90 | $command = $fileInfo->getBasename('.php'); |
| 91 | - $className = __NAMESPACE__ . "\\Commands\\$command"; |
|
| 91 | + $className = __NAMESPACE__."\\Commands\\$command"; |
|
| 92 | 92 | |
| 93 | 93 | if (!class_exists($className)) |
| 94 | 94 | { |
@@ -161,7 +161,7 @@ |
||
| 161 | 161 | */ |
| 162 | 162 | private function doMigration($version) |
| 163 | 163 | { |
| 164 | - $sqlFile = 'migrations/' . $version . '.sql'; |
|
| 164 | + $sqlFile = 'migrations/'.$version.'.sql'; |
|
| 165 | 165 | |
| 166 | 166 | if (!$this->filesystem->has($sqlFile)) |
| 167 | 167 | { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $container->alias('db', DatabaseDriver::class) |
| 31 | 31 | ->share( |
| 32 | 32 | DatabaseDriver::class, |
| 33 | - function (Container $container) |
|
| 33 | + function(Container $container) |
|
| 34 | 34 | { |
| 35 | 35 | /** @var \Joomla\Registry\Registry $config */ |
| 36 | 36 | $config = $container->get('config'); |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $container->alias('db.migrations', Migrations::class) |
| 48 | 48 | ->set(Migrations::class, |
| 49 | - function (Container $container) |
|
| 49 | + function(Container $container) |
|
| 50 | 50 | { |
| 51 | 51 | return new Migrations( |
| 52 | 52 | $container->get('db'), |
| 53 | - new Filesystem(new Local(APPROOT . '/etc')) |
|
| 53 | + new Filesystem(new Local(APPROOT.'/etc')) |
|
| 54 | 54 | ); |
| 55 | 55 | }, true, true |
| 56 | 56 | ); |
@@ -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) |
@@ -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 | { |