Completed
Push — master ( 08a2e6...0a909f )
by Michael
07:28
created
src/Models/StatsModel.php 3 patches
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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 namespace Joomla\StatsServer\Models;
10 10
 
11 11
 use Joomla\Database\DatabaseDriver;
12
-use Joomla\Database\Query\LimitableInterface;
13 12
 use Joomla\Model\{
14 13
 	DatabaseModelInterface, DatabaseModelTrait
15 14
 };
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			return $db->setQuery(
59 59
 				$query
60 60
 					->select('*')
61
-					->from($db->quoteName('#__jstats_counter_' . $column))
61
+					->from($db->quoteName('#__jstats_counter_'.$column))
62 62
 			)->loadAssocList();
63 63
 		}
64 64
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 			$return[$column] = $db->setQuery(
76 76
 				$query->clear()
77 77
 					->select('*')
78
-					->from($db->quoteName('#__jstats_counter_' . $column))
78
+					->from($db->quoteName('#__jstats_counter_'.$column))
79 79
 			)->loadAssocList();
80 80
 		}
81 81
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
 			$return[$column] = $db->setQuery(
110 110
 				$query->select($column)
111
-					->select('COUNT(' . $column . ') AS count')
111
+					->select('COUNT('.$column.') AS count')
112 112
 					->from($db->quoteName('#__jstats'))
113 113
 					->where('modified BETWEEN DATE_SUB(NOW(), INTERVAL 90 DAY) AND NOW()')
114 114
 					->group($column)
Please login to merge, or discard this patch.
boot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 const APPROOT = __DIR__;
4 4
 
5
-$composerPath = APPROOT . '/vendor/autoload.php';
5
+$composerPath = APPROOT.'/vendor/autoload.php';
6 6
 
7 7
 if (!file_exists($composerPath))
8 8
 {
9 9
 	throw new RuntimeException('Composer is not set up, please run "composer install".');
10 10
 }
11 11
 
12
-require APPROOT . '/vendor/autoload.php';
12
+require APPROOT.'/vendor/autoload.php';
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/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   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,8 +95,7 @@
 block discarded – undo
95 95
 		if ($this->recent)
96 96
 		{
97 97
 			$items = $this->model->getRecentlyUpdatedItems();
98
-		}
99
-		else
98
+		} else
100 99
 		{
101 100
 			$items = $this->model->getItems($this->source);
102 101
 		}
Please login to merge, or discard this patch.
src/GitHub/GitHub.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	 */
26 26
 	public function __get($name)
27 27
 	{
28
-		$class = __NAMESPACE__ . '\\Package\\' . ucfirst($name);
28
+		$class = __NAMESPACE__.'\\Package\\'.ucfirst($name);
29 29
 
30 30
 		if (class_exists($class))
31 31
 		{
Please login to merge, or discard this patch.
src/GitHub/Package.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	 */
24 24
 	public function __get($name)
25 25
 	{
26
-		$class = __NAMESPACE__ . '\\' . $this->package . '\\' . ucfirst($name);
26
+		$class = __NAMESPACE__.'\\'.$this->package.'\\'.ucfirst($name);
27 27
 
28 28
 		if (class_exists($class))
29 29
 		{
Please login to merge, or discard this patch.
src/GitHub/Package/Repositories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	public function getTags($owner, $repo, $page = 0)
50 50
 	{
51 51
 		// Build the request path.
52
-		$path = '/repos/' . $owner . '/' . $repo . '/tags';
52
+		$path = '/repos/'.$owner.'/'.$repo.'/tags';
53 53
 
54 54
 		// Send the request.
55 55
 		$this->apiResponse = $this->client->get($this->fetchUrl($path, $page));
Please login to merge, or discard this patch.