Completed
Pull Request — master (#28)
by Michael
02:19
created
src/Providers/CacheServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		$container->alias('cache', CacheInterface::class)
29 29
 			->share(
30 30
 				CacheInterface::class,
31
-				function (Container $container)
31
+				function(Container $container)
32 32
 				{
33 33
 					/** @var \Joomla\Registry\Registry $config */
34 34
 					$config = $container->get('config');
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 							// If the path is relative, make it absolute
61 61
 							if (substr($path, 0, 1) !== '/')
62 62
 							{
63
-								$path = APPROOT . '/' . $path;
63
+								$path = APPROOT.'/'.$path;
64 64
 							}
65 65
 
66 66
 							$handler = new Cache\FilesystemCache($path);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 							// If the path is relative, make it absolute
80 80
 							if (substr($path, 0, 1) !== '/')
81 81
 							{
82
-								$path = APPROOT . '/' . $path;
82
+								$path = APPROOT.'/'.$path;
83 83
 							}
84 84
 
85 85
 							$handler = new Cache\PhpFileCache($path);
Please login to merge, or discard this patch.
src/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 	protected function fetchController($name)
30 30
 	{
31 31
 		// Derive the controller class name.
32
-		$class = $this->controllerPrefix . ucfirst($name);
32
+		$class = $this->controllerPrefix.ucfirst($name);
33 33
 
34 34
 		// If the controller class does not exist panic.
35 35
 		if (!class_exists($class))
Please login to merge, or discard this patch.
src/Commands/HelpCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
 
49 49
 		foreach ($this->getApplication()->getConsole()->getCommands() as $cName => $command)
50 50
 		{
51
-			$this->getApplication()->out('<cmd>' . $cName . '</cmd>');
51
+			$this->getApplication()->out('<cmd>'.$cName.'</cmd>');
52 52
 
53 53
 			if ($command->getDescription())
54 54
 			{
55
-				$this->getApplication()->out('    ' . $command->getDescription());
55
+				$this->getApplication()->out('    '.$command->getDescription());
56 56
 			}
57 57
 
58 58
 			$this->getApplication()->out();
Please login to merge, or discard this patch.
src/Commands/SnapshotCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 */
34 34
 	public function __construct(StatsJsonView $view)
35 35
 	{
36
-		$this->view  = $view;
36
+		$this->view = $view;
37 37
 	}
38 38
 
39 39
 	/**
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 		// We want the full raw data set for our snapshot
51 51
 		$this->view->isAuthorizedRaw(true);
52 52
 
53
-		$file = APPROOT . '/snapshots/' . date('YmdHis');
53
+		$file = APPROOT.'/snapshots/'.date('YmdHis');
54 54
 
55 55
 		if (!file_put_contents($file, $this->view->render()))
56 56
 		{
57
-			throw new \RuntimeException('Failed writing snapshot to the filesystem at ' . $file);
57
+			throw new \RuntimeException('Failed writing snapshot to the filesystem at '.$file);
58 58
 		}
59 59
 
60 60
 		$this->getApplication()->out('<info>Snapshot successfully recorded.</info>');
Please login to merge, or discard this patch.
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   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,15 +72,13 @@
 block discarded – undo
72 72
 			if ($this->cache->contains($key))
73 73
 			{
74 74
 				$body = $this->cache->fetch($key);
75
-			}
76
-			else
75
+			} else
77 76
 			{
78 77
 				$body = $this->view->render();
79 78
 
80 79
 				$this->cache->save($key, $body, $this->getApplication()->get('cache.lifetime', 900));
81 80
 			}
82
-		}
83
-		else
81
+		} else
84 82
 		{
85 83
 			$body = $this->view->render();
86 84
 		}
Please login to merge, or discard this patch.
src/Providers/GitHubServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 		$container->alias('db', DatabaseDriver::class)
28 28
 			->share(
29 29
 				DatabaseDriver::class,
30
-				function (Container $container)
30
+				function(Container $container)
31 31
 				{
32 32
 					$config = $container->get('config');
33 33
 
Please login to merge, or discard this patch.
src/Providers/ApplicationServiceProvider.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		$container->alias(CliApplication::class, JoomlaApplication\AbstractCliApplication::class)
45 45
 			->share(
46 46
 				JoomlaApplication\AbstractCliApplication::class,
47
-				function (Container $container)
47
+				function(Container $container)
48 48
 				{
49 49
 					$application = new CliApplication(
50 50
 						$container->get(Cli::class),
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		$container->alias(WebApplication::class, JoomlaApplication\AbstractWebApplication::class)
66 66
 			->share(
67 67
 				JoomlaApplication\AbstractWebApplication::class,
68
-				function (Container $container)
68
+				function(Container $container)
69 69
 				{
70 70
 					$application = new WebApplication($container->get(Input::class), $container->get('config'));
71 71
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 		$container->share(
82 82
 			Input::class,
83
-			function ()
83
+			function()
84 84
 			{
85 85
 				return new Input($_REQUEST);
86 86
 			},
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 		$container->share(
91 91
 			Cli::class,
92
-			function ()
92
+			function()
93 93
 			{
94 94
 				return new Cli;
95 95
 			},
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 		$container->share(
100 100
 			Console::class,
101
-			function (Container $container)
101
+			function(Container $container)
102 102
 			{
103 103
 				$console = new Console;
104 104
 				$console->setContainer($container);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 		$container->share(
111 111
 			JoomlaApplication\Cli\Output\Processor\ColorProcessor::class,
112
-			function (Container $container)
112
+			function(Container $container)
113 113
 			{
114 114
 				$processor = new JoomlaApplication\Cli\Output\Processor\ColorProcessor;
115 115
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		$container->alias(JoomlaApplication\Cli\CliOutput::class, JoomlaApplication\Cli\Output\Stdout::class)
132 132
 			->share(
133 133
 				JoomlaApplication\Cli\Output\Stdout::class,
134
-				function (Container $container)
134
+				function(Container $container)
135 135
 				{
136 136
 					return new JoomlaApplication\Cli\Output\Stdout($container->get(JoomlaApplication\Cli\Output\Processor\ColorProcessor::class));
137 137
 				}
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 		$container->share(
141 141
 			Router::class,
142
-			function (Container $container)
142
+			function(Container $container)
143 143
 			{
144 144
 				$router = (new Router($container->get(Input::class)))
145 145
 					->setContainer($container)
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
 		$container->share(
157 157
 			HelpCommand::class,
158
-			function (Container $container)
158
+			function(Container $container)
159 159
 			{
160 160
 				$command = new HelpCommand;
161 161
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 		$container->share(
171 171
 			JoomlaTagsCommand::class,
172
-			function (Container $container)
172
+			function(Container $container)
173 173
 			{
174 174
 				$command = new JoomlaTagsCommand($container->get(GitHub::class));
175 175
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 		$container->share(
185 185
 			SnapshotCommand::class,
186
-			function (Container $container)
186
+			function(Container $container)
187 187
 			{
188 188
 				$command = new SnapshotCommand($container->get(StatsJsonView::class));
189 189
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
 		$container->share(
199 199
 			DisplayControllerGet::class,
200
-			function (Container $container)
200
+			function(Container $container)
201 201
 			{
202 202
 				$controller = new DisplayControllerGet(
203 203
 					$container->get(StatsJsonView::class),
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
 		$container->share(
216 216
 			SubmitControllerCreate::class,
217
-			function (Container $container)
217
+			function(Container $container)
218 218
 			{
219 219
 				$controller = new SubmitControllerCreate(
220 220
 					$container->get(StatsModel::class)
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
 		$container->share(
232 232
 			SubmitControllerGet::class,
233
-			function (Container $container)
233
+			function(Container $container)
234 234
 			{
235 235
 				$controller = new SubmitControllerGet;
236 236
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
 		$container->share(
246 246
 			StatsModel::class,
247
-			function (Container $container)
247
+			function(Container $container)
248 248
 			{
249 249
 				return new StatsModel(
250 250
 					$container->get(DatabaseDriver::class)
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
 		$container->share(
257 257
 			StatsJsonView::class,
258
-			function (Container $container)
258
+			function(Container $container)
259 259
 			{
260 260
 				return new StatsJsonView(
261 261
 					$container->get(StatsModel::class)
Please login to merge, or discard this patch.
src/Commands/JoomlaTagsCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@
 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
 
97 97
 		// Store the version data now
98
-		$path = APPROOT . '/versions/joomla.json';
98
+		$path = APPROOT.'/versions/joomla.json';
99 99
 
100 100
 		if (file_put_contents($path, json_encode($versions)) === false)
101 101
 		{
Please login to merge, or discard this patch.
src/Controllers/SubmitControllerCreate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 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
 		{
Please login to merge, or discard this patch.