Completed
Push — master ( d2a193...a63b69 )
by Michael
02:24
created
src/Models/StatsModel.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 			$query = $db->getQuery(true)
56 56
 				->select($column);
57
-		}
58
-		else
57
+		} else
59 58
 		{
60 59
 			$query = $db->getQuery(true)
61 60
 				->select(['php_version', 'db_type', 'db_version', 'cms_version', 'server_os']);
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
 				$query->setLimit($this->batchSize, $offset);
75 74
 
76 75
 				$db->setQuery($query);
77
-			}
78
-			else
76
+			} else
79 77
 			{
80 78
 				$db->setQuery($query, $offset, $this->batchSize);
81 79
 			}
@@ -119,8 +117,7 @@  discard block
 block discarded – undo
119 117
 		if ($recordExists)
120 118
 		{
121 119
 			$db->updateObject('#__jstats', $data, ['unique_id']);
122
-		}
123
-		else
120
+		} else
124 121
 		{
125 122
 			$db->insertObject('#__jstats', $data, ['unique_id']);
126 123
 		}
Please login to merge, or discard this patch.
src/Views/Stats/StatsJsonView.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@
 block discarded – undo
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]))
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@  discard block
 block discarded – undo
105 105
 							}
106 106
 
107 107
 							${$source}['unknown']++;
108
-						}
109
-						else
108
+						} else
110 109
 						{
111 110
 							if (!isset(${$source}[$item[$source]]))
112 111
 							{
@@ -224,8 +223,7 @@  discard block
 block discarded – undo
224 223
 							}
225 224
 
226 225
 							$data[$source]['unknown']++;
227
-						}
228
-						else
226
+						} else
229 227
 						{
230 228
 							if (!isset($data[$source][$item[$source]]))
231 229
 							{
Please login to merge, or discard this patch.
src/WebApplication.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 			try
62 62
 			{
63 63
 				$this->analytics->sendPageview();
64
-			}
65
-			catch (\Exception $e)
64
+			} catch (\Exception $e)
66 65
 			{
67 66
 				// Log the error for reference
68 67
 				$this->getLogger()->error(
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
 		try
76 75
 		{
77 76
 			$this->router->getController($this->get('uri.route'))->execute();
78
-		}
79
-		catch (\Exception $e)
77
+		} catch (\Exception $e)
80 78
 		{
81 79
 			// Log the error for reference
82 80
 			$this->getLogger()->error(
Please login to merge, or discard this patch.
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.