Completed
Push — master ( a63b69...737fe7 )
by Michael
03:01
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/Commands/InstallCommand.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
 	 */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		{
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 			}
Please login to merge, or discard this patch.