Passed
Pull Request — master (#526)
by Michael
06:45
created
includes/statistics/StatsMain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	{
19 19
 		global $smarty, $filepath;
20 20
 
21
-		$files = scandir($filepath . "/includes/statistics/");
21
+		$files = scandir($filepath."/includes/statistics/");
22 22
 
23 23
 		$statsPageDefinitions = preg_grep("/php$/", $files);
24 24
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 		foreach ($statsPageDefinitions as $i) {
28 28
 			// TODO: is this require still needed? AutoLoader ftw.
29
-			require_once($filepath . "/includes/statistics/" . $i);
29
+			require_once($filepath."/includes/statistics/".$i);
30 30
 			$expld = explode('.', $i);
31 31
 			$className = $expld[0];
32 32
 
Please login to merge, or discard this patch.
includes/statistics/StatsTopCreators.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 
181 181
 	$out .= '>';
182 182
 
183
-	$out .= '<td>' . $rowno . '</td>';
184
-	$out .= '<td>' . $row['COUNT(*)'] . '</td>';
183
+	$out .= '<td>'.$rowno.'</td>';
184
+	$out .= '<td>'.$row['COUNT(*)'].'</td>';
185 185
 
186 186
 	global $baseurl;
187 187
 	$out .= '<td><a ';
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		$out .= 'class="text-success" ';
194 194
 	}
195 195
 
196
-	$out .= 'href="' . $baseurl . '/statistics.php?page=Users&amp;user=' . $row['user_id'] . '">' . $row['log_user'] . '</a></td>';
196
+	$out .= 'href="'.$baseurl.'/statistics.php?page=Users&amp;user='.$row['user_id'].'">'.$row['log_user'].'</a></td>';
197 197
 
198 198
 	$out .= '</tr>';
199 199
 
Please login to merge, or discard this patch.
includes/statistics/StatsMonthlyStats.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 		global $showGraphs;
35 35
 		if ($showGraphs == 1) {
36 36
 			global $filepath;
37
-			require_once($filepath . 'graph/pChart/pChart.class');
38
-			require_once($filepath . 'graph/pChart/pData.class');
37
+			require_once($filepath.'graph/pChart/pChart.class');
38
+			require_once($filepath.'graph/pChart/pData.class');
39 39
 
40 40
 			$queries = array();
41 41
 
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
 ORDER BY YEAR(timestamp) , MONTH(timestamp) ASC;
136 136
 SQL
137 137
 					,
138
-					'series' => "Requests deferred to " . $state['deferto'] . " by month"
138
+					'series' => "Requests deferred to ".$state['deferto']." by month"
139 139
 				);
140 140
 			}
141 141
 
142 142
 			global $baseurl;
143 143
 			foreach ($this->createClosuresGraph($queries) as $i) {
144 144
 
145
-				$out .= '<img src="' . $baseurl . '/render/' . $i[0] . '" alt="' . $i[1] . '"/>';
145
+				$out .= '<img src="'.$baseurl.'/render/'.$i[0].'" alt="'.$i[1].'"/>';
146 146
 			}
147 147
 
148 148
 		}
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 					// Finish the graph
217 217
 					$Test->setFontProperties("graph/Fonts/tahoma.ttf", 10);
218 218
 					$Test->drawTitle(50, 22, $q['series'], 50, 50, 50, 585);
219
-					$Test->Render("render/" . $chartname);
219
+					$Test->Render("render/".$chartname);
220 220
 				}
221 221
 			}
222 222
 		}
@@ -232,11 +232,11 @@  discard block
 block discarded – undo
232 232
 	private function createPathFromHash($imghash, $basedirectory = "render/")
233 233
 	{
234 234
 		$imghashparts = str_split($imghash);
235
-		$imgpath = array_shift($imghashparts) . "/";
236
-		$imgpath .= array_shift($imghashparts) . "/";
237
-		$imgpath .= array_shift($imghashparts) . "/";
235
+		$imgpath = array_shift($imghashparts)."/";
236
+		$imgpath .= array_shift($imghashparts)."/";
237
+		$imgpath .= array_shift($imghashparts)."/";
238 238
 
239
-		is_dir($basedirectory . $imgpath) || mkdir($basedirectory . $imgpath, 0777, true);
239
+		is_dir($basedirectory.$imgpath) || mkdir($basedirectory.$imgpath, 0777, true);
240 240
 
241 241
 		$imgpath .= implode("", $imghashparts);
242 242
 		return $imgpath;
Please login to merge, or discard this patch.
includes/statistics/StatsFastCloses.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,10 +87,10 @@
 block discarded – undo
87 87
 		$out .= "<td>";
88 88
 
89 89
 		if ($colid == 0) {
90
-			$out .= "<a href=\"" . $baseurl . "/acc.php?action=zoom&id=" . $cell . "\">";
90
+			$out .= "<a href=\"".$baseurl."/acc.php?action=zoom&id=".$cell."\">";
91 91
 		}
92 92
 		if ($colid == 1) {
93
-			$out .= "<a href=\"" . $baseurl . "/statistics.php/Users?user=" . $row[++$colid] . "\">";
93
+			$out .= "<a href=\"".$baseurl."/statistics.php/Users?user=".$row[++$colid]."\">";
94 94
 		}
95 95
 
96 96
 		$out .= $cell;
Please login to merge, or discard this patch.
includes/request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 		}
61 61
 		
62 62
 		// Generates a new host name by means of the IP array and TOR string.
63
-		$ahbladdr = $p['3'] . "." . $p['2'] . "." . $p['1'] . "." . $p['0'] . "." . "tor.ahbl.org";
63
+		$ahbladdr = $p['3'].".".$p['2'].".".$p['1'].".".$p['0']."."."tor.ahbl.org";
64 64
 
65 65
 		// Get the IP address corresponding to a given host name.
66 66
 		$ahbl = gethostbyname($ahbladdr);
Please login to merge, or discard this patch.
includes/DataObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public static function getById($id, PdoDatabase $database)
53 53
 	{
54
-		$statement = $database->prepare("SELECT * FROM `" . strtolower(get_called_class()) . "` WHERE id = :id LIMIT 1;");
54
+		$statement = $database->prepare("SELECT * FROM `".strtolower(get_called_class())."` WHERE id = :id LIMIT 1;");
55 55
 		$statement->bindValue(":id", $id);
56 56
 
57 57
 		$statement->execute();
@@ -98,6 +98,6 @@  discard block
 block discarded – undo
98 98
 	
99 99
 	public function getObjectDescription()
100 100
 	{
101
-		return '[' . get_called_class() . " " . $this->getId() . ']';	
101
+		return '['.get_called_class()." ".$this->getId().']';	
102 102
 	}
103 103
 }
Please login to merge, or discard this patch.
includes/AuthUtility.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	private static function encryptVersion1($password, $salt)
67 67
 	{
68
-		return ':1:' . $salt . ':' . md5($salt . '-' . md5($password));
68
+		return ':1:'.$salt.':'.md5($salt.'-'.md5($password));
69 69
 	}
70 70
 
71 71
 	/**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	private static function encryptVersion2($password)
76 76
 	{
77
-		return ':2:x:' . password_hash($password, PASSWORD_BCRYPT);
77
+		return ':2:x:'.password_hash($password, PASSWORD_BCRYPT);
78 78
 	}
79 79
 
80 80
 	/**
Please login to merge, or discard this patch.
includes/AutoLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
 		}
20 20
 
21 21
 		$paths = array(
22
-			$filepath . 'includes/' . $class . ".php",
23
-			$filepath . 'includes/DataObjects/' . $class . ".php",
24
-			$filepath . 'includes/Providers/' . $class . ".php",
25
-			$filepath . 'includes/Providers/Interfaces/' . $class . ".php",
26
-			$filepath . 'includes/Validation/' . $class . ".php",
27
-			$filepath . 'includes/Helpers/' . $class . ".php",
28
-			$filepath . 'includes/Helpers/Interfaces/' . $class . ".php",
29
-			$filepath . $class . ".php",
22
+			$filepath.'includes/'.$class.".php",
23
+			$filepath.'includes/DataObjects/'.$class.".php",
24
+			$filepath.'includes/Providers/'.$class.".php",
25
+			$filepath.'includes/Providers/Interfaces/'.$class.".php",
26
+			$filepath.'includes/Validation/'.$class.".php",
27
+			$filepath.'includes/Helpers/'.$class.".php",
28
+			$filepath.'includes/Helpers/Interfaces/'.$class.".php",
29
+			$filepath.$class.".php",
30 30
 		);
31 31
 
32 32
 		foreach ($paths as $file) {
Please login to merge, or discard this patch.
includes/Providers/IpLocationProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 	{
55 55
 		try {
56 56
 			if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
57
-				$xml = @file_get_contents($this->getApiBase() . '?key=' . $this->apikey . '&ip=' . $ip . '&format=xml');
57
+				$xml = @file_get_contents($this->getApiBase().'?key='.$this->apikey.'&ip='.$ip.'&format=xml');
58 58
 
59 59
 				$response = @new SimpleXMLElement($xml);
60 60
 
Please login to merge, or discard this patch.