Completed
Push — master ( d2a193...a63b69 )
by Michael
02:24
created
src/Commands/Database/StatusCommand.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
src/Commands/Database/MigrateCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/Console.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 				{
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@
 block discarded – undo
84 84
 		
85 85
 					$commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className);
86 86
 				}
87
-			}
88
-			else
87
+			} else
89 88
 			{
90 89
 				$command   = $fileInfo->getBasename('.php');
91 90
 				$className = __NAMESPACE__ . "\\Commands\\$command";
Please login to merge, or discard this patch.
src/Database/Migrations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
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
 		{
Please login to merge, or discard this patch.
src/Providers/DatabaseServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		);
Please login to merge, or discard this patch.
src/Providers/ApplicationServiceProvider.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		$container->alias(CliApplication::class, JoomlaApplication\AbstractCliApplication::class)
48 48
 			->share(
49 49
 				JoomlaApplication\AbstractCliApplication::class,
50
-				function (Container $container)
50
+				function(Container $container)
51 51
 				{
52 52
 					$application = new CliApplication(
53 53
 						$container->get(Cli::class),
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		$container->alias(WebApplication::class, JoomlaApplication\AbstractWebApplication::class)
69 69
 			->share(
70 70
 				JoomlaApplication\AbstractWebApplication::class,
71
-				function (Container $container)
71
+				function(Container $container)
72 72
 				{
73 73
 					$application = new WebApplication($container->get(Input::class), $container->get('config'));
74 74
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$container->share(
86 86
 			Input::class,
87
-			function ()
87
+			function()
88 88
 			{
89 89
 				return new Input($_REQUEST);
90 90
 			},
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 		$container->share(
95 95
 			Cli::class,
96
-			function ()
96
+			function()
97 97
 			{
98 98
 				return new Cli;
99 99
 			},
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 		$container->share(
104 104
 			Console::class,
105
-			function (Container $container)
105
+			function(Container $container)
106 106
 			{
107 107
 				$console = new Console;
108 108
 				$console->setContainer($container);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		$container->share(
115 115
 			JoomlaApplication\Cli\Output\Processor\ColorProcessor::class,
116
-			function (Container $container)
116
+			function(Container $container)
117 117
 			{
118 118
 				$processor = new JoomlaApplication\Cli\Output\Processor\ColorProcessor;
119 119
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 		$container->alias(JoomlaApplication\Cli\CliOutput::class, JoomlaApplication\Cli\Output\Stdout::class)
136 136
 			->share(
137 137
 				JoomlaApplication\Cli\Output\Stdout::class,
138
-				function (Container $container)
138
+				function(Container $container)
139 139
 				{
140 140
 					return new JoomlaApplication\Cli\Output\Stdout($container->get(JoomlaApplication\Cli\Output\Processor\ColorProcessor::class));
141 141
 				}
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
 		$container->share(
145 145
 			Analytics::class,
146
-			function ()
146
+			function()
147 147
 			{
148 148
 				return new Analytics(true);
149 149
 			}
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
 		$container->share(
153 153
 			Router::class,
154
-			function (Container $container)
154
+			function(Container $container)
155 155
 			{
156 156
 				$router = (new Router($container->get(Input::class)))
157 157
 					->setContainer($container)
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
 		$container->share(
169 169
 			HelpCommand::class,
170
-			function (Container $container)
170
+			function(Container $container)
171 171
 			{
172 172
 				$command = new HelpCommand;
173 173
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
 		$container->share(
183 183
 			SnapshotCommand::class,
184
-			function (Container $container)
184
+			function(Container $container)
185 185
 			{
186 186
 				$command = new SnapshotCommand($container->get(StatsJsonView::class));
187 187
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
 		$container->share(
197 197
 			MigrateCommand::class,
198
-			function (Container $container)
198
+			function(Container $container)
199 199
 			{
200 200
 				$command = new MigrateCommand($container->get(Migrations::class));
201 201
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 
211 211
 		$container->share(
212 212
 			StatusCommand::class,
213
-			function (Container $container)
213
+			function(Container $container)
214 214
 			{
215 215
 				$command = new StatusCommand($container->get(Migrations::class));
216 216
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
 		$container->share(
226 226
 			DisplayControllerGet::class,
227
-			function (Container $container)
227
+			function(Container $container)
228 228
 			{
229 229
 				$controller = new DisplayControllerGet(
230 230
 					$container->get(StatsJsonView::class),
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
 		$container->share(
243 243
 			SubmitControllerCreate::class,
244
-			function (Container $container)
244
+			function(Container $container)
245 245
 			{
246 246
 				$controller = new SubmitControllerCreate(
247 247
 					$container->get(StatsModel::class)
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
 		$container->share(
259 259
 			SubmitControllerGet::class,
260
-			function (Container $container)
260
+			function(Container $container)
261 261
 			{
262 262
 				$controller = new SubmitControllerGet;
263 263
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
 		$container->share(
273 273
 			StatsModel::class,
274
-			function (Container $container)
274
+			function(Container $container)
275 275
 			{
276 276
 				return new StatsModel(
277 277
 					$container->get(DatabaseDriver::class)
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
 		$container->share(
284 284
 			StatsJsonView::class,
285
-			function (Container $container)
285
+			function(Container $container)
286 286
 			{
287 287
 				return new StatsJsonView(
288 288
 					$container->get(StatsModel::class)
Please login to merge, or discard this patch.