Completed
Push — master ( f736fb...561485 )
by Michael
06:11
created
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/Commands/InstallCommand.php 2 patches
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.
src/Commands/UpdateCommand.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Stats\Commands;
4 4
 
5 5
 use Joomla\Controller\AbstractController;
6
-use Joomla\Database\DatabaseDriver;
7 6
 use Stats\CommandInterface;
8 7
 
9 8
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
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
 
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,7 +75,7 @@  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
 					{
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 					// If the class isn't instantiable, it isn't a valid command
86 86
 					if ((new \ReflectionClass($className))->isInstantiable())
87 87
 					{
88
-						$commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className);
88
+						$commands[strtolower("$namespace:".str_replace('Command', '', $command))] = $this->getContainer()->get($className);
89 89
 					}
90 90
 				}
91 91
 			}
92 92
 			else
93 93
 			{
94 94
 				$command   = $fileInfo->getBasename('.php');
95
-				$className = __NAMESPACE__ . "\\Commands\\$command";
95
+				$className = __NAMESPACE__."\\Commands\\$command";
96 96
 
97 97
 				if (!class_exists($className))
98 98
 				{
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@
 block discarded – undo
85 85
 						$commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className);
86 86
 					}
87 87
 				}
88
-			}
89
-			else
88
+			} else
90 89
 			{
91 90
 				$command   = $fileInfo->getBasename('.php');
92 91
 				$className = __NAMESPACE__ . "\\Commands\\$command";
Please login to merge, or discard this patch.
src/Commands/Tags/PhpCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,15 +95,15 @@
 block discarded – undo
95 95
 
96 96
 			// Allow the next patch release after this one
97 97
 			$nextPatch = $explodedVersion[2] + 1;
98
-			$versions[] = $explodedVersion[0] . '.' . $explodedVersion[1] . '.' . $nextPatch;
98
+			$versions[] = $explodedVersion[0].'.'.$explodedVersion[1].'.'.$nextPatch;
99 99
 
100 100
 			// And allow the next minor release after this one
101 101
 			$nextMinor = $explodedVersion[1] + 1;
102
-			$versions[] = $explodedVersion[0] . '.' . $nextMinor . '.0';
102
+			$versions[] = $explodedVersion[0].'.'.$nextMinor.'.0';
103 103
 		}
104 104
 
105 105
 		// Store the version data now
106
-		$path = APPROOT . '/versions/php.json';
106
+		$path = APPROOT.'/versions/php.json';
107 107
 
108 108
 		if (file_put_contents($path, json_encode($versions)) === false)
109 109
 		{
Please login to merge, or discard this patch.
src/Controllers/SubmitControllerCreate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		}
156 156
 
157 157
 		// Import the valid release listing
158
-		$path = APPROOT . '/versions/joomla.json';
158
+		$path = APPROOT.'/versions/joomla.json';
159 159
 
160 160
 		if (!file_exists($path))
161 161
 		{
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		}
221 221
 
222 222
 		// Import the valid release listing
223
-		$path = APPROOT . '/versions/php.json';
223
+		$path = APPROOT.'/versions/php.json';
224 224
 
225 225
 		if (!file_exists($path))
226 226
 		{
Please login to merge, or discard this patch.
src/CliApplication.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	/**
31 31
 	 * CliApplication constructor.
32 32
 	 *
33
-	 * @param   Input\Cli  $input     The application's input object.
33
+	 * @param   Cli  $input     The application's input object.
34 34
 	 * @param   Registry   $config    The application's configuration.
35 35
 	 * @param   CliOutput  $output    The application's output object.
36 36
 	 * @param   CliInput   $cliInput  The application's CLI input handler.
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@
 block discarded – undo
89 89
 	public function outputTitle(string $title, string $subTitle = '', int $width = 60) : CliApplication
90 90
 	{
91 91
 		$this->out(str_repeat('-', $width));
92
-		$this->out(str_repeat(' ', $width / 2 - (strlen($title) / 2)) . '<title>' . $title . '</title>');
92
+		$this->out(str_repeat(' ', $width / 2 - (strlen($title) / 2)).'<title>'.$title.'</title>');
93 93
 
94 94
 		if ($subTitle)
95 95
 		{
96
-			$this->out(str_repeat(' ', $width / 2 - (strlen($subTitle) / 2)) . '<b>' . $subTitle . '</b>');
96
+			$this->out(str_repeat(' ', $width / 2 - (strlen($subTitle) / 2)).'<b>'.$subTitle.'</b>');
97 97
 		}
98 98
 
99 99
 		$this->out(str_repeat('-', $width));
Please login to merge, or discard this patch.
src/Commands/Tags/JoomlaCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,20 +87,20 @@
 block discarded – undo
87 87
 
88 88
 			// Allow the next patch release after this one
89 89
 			$nextPatch = $explodedVersion[2] + 1;
90
-			$versions[] = $explodedVersion[0] . '.' . $explodedVersion[1] . '.' . $nextPatch;
90
+			$versions[] = $explodedVersion[0].'.'.$explodedVersion[1].'.'.$nextPatch;
91 91
 
92 92
 			// And allow the next minor release after this one
93 93
 			$nextMinor = $explodedVersion[1] + 1;
94
-			$versions[] = $explodedVersion[0] . '.' . $nextMinor . '.0';
94
+			$versions[] = $explodedVersion[0].'.'.$nextMinor.'.0';
95 95
 
96 96
 			// And allow the next major release after this one
97 97
 			// TODO - Remove this once there is a 4.0 tag
98 98
 			$nextMajor = $explodedVersion[0] + 1;
99
-			$versions[] = $nextMajor . '.0.0';
99
+			$versions[] = $nextMajor.'.0.0';
100 100
 		}
101 101
 
102 102
 		// Store the version data now
103
-		$path = APPROOT . '/versions/joomla.json';
103
+		$path = APPROOT.'/versions/joomla.json';
104 104
 
105 105
 		if (file_put_contents($path, json_encode($versions)) === false)
106 106
 		{
Please login to merge, or discard this patch.
src/Providers/DatabaseServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 	{
69 69
 		return new Migrations(
70 70
 			$container->get('db'),
71
-			new Filesystem(new Local(APPROOT . '/etc'))
71
+			new Filesystem(new Local(APPROOT.'/etc'))
72 72
 		);
73 73
 	}
74 74
 }
Please login to merge, or discard this patch.