@@ -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 | ); |
@@ -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 | { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $container->alias(CliApplication::class, JoomlaApplication\AbstractCliApplication::class) |
| 51 | 51 | ->share( |
| 52 | 52 | JoomlaApplication\AbstractCliApplication::class, |
| 53 | - function (Container $container) |
|
| 53 | + function(Container $container) |
|
| 54 | 54 | { |
| 55 | 55 | $application = new CliApplication( |
| 56 | 56 | $container->get(Cli::class), |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $container->alias(WebApplication::class, JoomlaApplication\AbstractWebApplication::class) |
| 72 | 72 | ->share( |
| 73 | 73 | JoomlaApplication\AbstractWebApplication::class, |
| 74 | - function (Container $container) |
|
| 74 | + function(Container $container) |
|
| 75 | 75 | { |
| 76 | 76 | $application = new WebApplication($container->get(Input::class), $container->get('config')); |
| 77 | 77 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | $container->share( |
| 89 | 89 | Input::class, |
| 90 | - function () |
|
| 90 | + function() |
|
| 91 | 91 | { |
| 92 | 92 | return new Input($_REQUEST); |
| 93 | 93 | }, |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | $container->share( |
| 98 | 98 | Cli::class, |
| 99 | - function () |
|
| 99 | + function() |
|
| 100 | 100 | { |
| 101 | 101 | return new Cli; |
| 102 | 102 | }, |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $container->share( |
| 107 | 107 | Console::class, |
| 108 | - function (Container $container) |
|
| 108 | + function(Container $container) |
|
| 109 | 109 | { |
| 110 | 110 | $console = new Console; |
| 111 | 111 | $console->setContainer($container); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | $container->share( |
| 118 | 118 | JoomlaApplication\Cli\Output\Processor\ColorProcessor::class, |
| 119 | - function (Container $container) |
|
| 119 | + function(Container $container) |
|
| 120 | 120 | { |
| 121 | 121 | $processor = new JoomlaApplication\Cli\Output\Processor\ColorProcessor; |
| 122 | 122 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $container->alias(JoomlaApplication\Cli\CliOutput::class, JoomlaApplication\Cli\Output\Stdout::class) |
| 139 | 139 | ->share( |
| 140 | 140 | JoomlaApplication\Cli\Output\Stdout::class, |
| 141 | - function (Container $container) |
|
| 141 | + function(Container $container) |
|
| 142 | 142 | { |
| 143 | 143 | return new JoomlaApplication\Cli\Output\Stdout($container->get(JoomlaApplication\Cli\Output\Processor\ColorProcessor::class)); |
| 144 | 144 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | $container->share( |
| 148 | 148 | Analytics::class, |
| 149 | - function () |
|
| 149 | + function() |
|
| 150 | 150 | { |
| 151 | 151 | return new Analytics(true); |
| 152 | 152 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | $container->share( |
| 156 | 156 | Router::class, |
| 157 | - function (Container $container) |
|
| 157 | + function(Container $container) |
|
| 158 | 158 | { |
| 159 | 159 | $router = (new Router($container->get(Input::class))) |
| 160 | 160 | ->setContainer($container) |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | $container->share( |
| 172 | 172 | HelpCommand::class, |
| 173 | - function (Container $container) |
|
| 173 | + function(Container $container) |
|
| 174 | 174 | { |
| 175 | 175 | $command = new HelpCommand; |
| 176 | 176 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | $container->share( |
| 186 | 186 | InstallCommand::class, |
| 187 | - function (Container $container) |
|
| 187 | + function(Container $container) |
|
| 188 | 188 | { |
| 189 | 189 | $command = new InstallCommand($container->get(DatabaseDriver::class)); |
| 190 | 190 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | |
| 199 | 199 | $container->share( |
| 200 | 200 | SnapshotCommand::class, |
| 201 | - function (Container $container) |
|
| 201 | + function(Container $container) |
|
| 202 | 202 | { |
| 203 | 203 | $command = new SnapshotCommand($container->get(StatsJsonView::class)); |
| 204 | 204 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | $container->share( |
| 214 | 214 | UpdateCommand::class, |
| 215 | - function (Container $container) |
|
| 215 | + function(Container $container) |
|
| 216 | 216 | { |
| 217 | 217 | $command = new UpdateCommand; |
| 218 | 218 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | |
| 227 | 227 | $container->share( |
| 228 | 228 | ClearCommand::class, |
| 229 | - function (Container $container) |
|
| 229 | + function(Container $container) |
|
| 230 | 230 | { |
| 231 | 231 | $command = new ClearCommand($container->get(Cache::class)); |
| 232 | 232 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | $container->share( |
| 242 | 242 | MigrateCommand::class, |
| 243 | - function (Container $container) |
|
| 243 | + function(Container $container) |
|
| 244 | 244 | { |
| 245 | 245 | $command = new MigrateCommand($container->get(Migrations::class)); |
| 246 | 246 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | $container->share( |
| 257 | 257 | StatusCommand::class, |
| 258 | - function (Container $container) |
|
| 258 | + function(Container $container) |
|
| 259 | 259 | { |
| 260 | 260 | $command = new StatusCommand($container->get(Migrations::class)); |
| 261 | 261 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | |
| 270 | 270 | $container->share( |
| 271 | 271 | DisplayControllerGet::class, |
| 272 | - function (Container $container) |
|
| 272 | + function(Container $container) |
|
| 273 | 273 | { |
| 274 | 274 | $controller = new DisplayControllerGet( |
| 275 | 275 | $container->get(StatsJsonView::class), |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | $container->share( |
| 288 | 288 | SubmitControllerCreate::class, |
| 289 | - function (Container $container) |
|
| 289 | + function(Container $container) |
|
| 290 | 290 | { |
| 291 | 291 | $controller = new SubmitControllerCreate( |
| 292 | 292 | $container->get(StatsModel::class) |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | |
| 303 | 303 | $container->share( |
| 304 | 304 | SubmitControllerGet::class, |
| 305 | - function (Container $container) |
|
| 305 | + function(Container $container) |
|
| 306 | 306 | { |
| 307 | 307 | $controller = new SubmitControllerGet; |
| 308 | 308 | |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | $container->share( |
| 318 | 318 | StatsModel::class, |
| 319 | - function (Container $container) |
|
| 319 | + function(Container $container) |
|
| 320 | 320 | { |
| 321 | 321 | return new StatsModel( |
| 322 | 322 | $container->get(DatabaseDriver::class) |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | $container->share( |
| 329 | 329 | StatsJsonView::class, |
| 330 | - function (Container $container) |
|
| 330 | + function(Container $container) |
|
| 331 | 331 | { |
| 332 | 332 | return new StatsJsonView( |
| 333 | 333 | $container->get(StatsModel::class) |
@@ -30,12 +30,12 @@ |
||
| 30 | 30 | $this->getApplication()->out('<info>Updating server to git HEAD</info>'); |
| 31 | 31 | |
| 32 | 32 | // Pull from remote repo |
| 33 | - $this->runCommand('cd ' . APPROOT . ' && git pull 2>&1'); |
|
| 33 | + $this->runCommand('cd '.APPROOT.' && git pull 2>&1'); |
|
| 34 | 34 | |
| 35 | 35 | $this->getApplication()->out('<info>Updating Composer resources</info>'); |
| 36 | 36 | |
| 37 | 37 | // Run Composer install |
| 38 | - $this->runCommand('cd ' . APPROOT . ' && composer install --no-dev -o 2>&1'); |
|
| 38 | + $this->runCommand('cd '.APPROOT.' && composer install --no-dev -o 2>&1'); |
|
| 39 | 39 | |
| 40 | 40 | $this->getApplication()->out('<info>Update complete</info>'); |
| 41 | 41 | |