Passed
Pull Request — master (#526)
by Michael
06:45
created
includes/BootstrapSkin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
 
119 119
 		// not equal to one, as zero uses the plural form too.
120 120
 		if ($resultSetCount != 1) {
121
-			$onlinemessage = $resultSetCount . " Account Creators currently online (past 5 minutes): $creators";
121
+			$onlinemessage = $resultSetCount." Account Creators currently online (past 5 minutes): $creators";
122 122
 		}
123 123
 		else {
124
-			$onlinemessage = $resultSetCount . " Account Creator currently online (past 5 minutes): $creators";
124
+			$onlinemessage = $resultSetCount." Account Creator currently online (past 5 minutes): $creators";
125 125
 		}
126 126
 
127
-		$online = '<p class="span6 text-right"><small>' . $onlinemessage . '</small></p>';
127
+		$online = '<p class="span6 text-right"><small>'.$onlinemessage.'</small></p>';
128 128
 
129 129
 		if (isset($_SESSION['user'])) {
130 130
 			$smarty->assign("onlineusers", $online);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		$returnData = $smarty->fetch("alert.tpl");
172 172
 
173 173
 		if ($centre) {
174
-			$returnData = '<div class="row-fluid"><div class="span8 offset2">' . $returnData . '</div></div>';
174
+			$returnData = '<div class="row-fluid"><div class="span8 offset2">'.$returnData.'</div></div>';
175 175
 		}
176 176
 
177 177
 		if ($return) {
Please login to merge, or discard this patch.
includes/Helpers/Logger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@
 block discarded – undo
292 292
 			$template = EmailTemplate::getById((int)$id, $entry->getDatabase());
293 293
 			
294 294
 			if ($template != false) {
295
-				return "closed (" . $template->getName() . ")";
295
+				return "closed (".$template->getName().")";
296 296
 			}
297 297
 			
298 298
 		}
Please login to merge, or discard this patch.
includes/Helpers/DebugHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
 			$output .= "#{$count}: ";
27 27
             
28 28
 			if (isset($line['type']) && $line['type'] != "") {
29
-				$output .= $line['class'] . $line['type'];
29
+				$output .= $line['class'].$line['type'];
30 30
 			}
31 31
             
32
-			$output .= $line['function'] . "(...)";
32
+			$output .= $line['function']."(...)";
33 33
 			$output .= " [{$line['file']}#{$line['line']}\r\n";
34 34
             
35 35
 			$count++;
Please login to merge, or discard this patch.
includes/Validation/RequestValidationHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		}
62 62
 
63 63
 		// username can't contain #@/<>[]|{}
64
-		if (preg_match("/[" . preg_quote("#@/<>[]|{}", "/") . "]/", $this->request->getName()) === 1) {
64
+		if (preg_match("/[".preg_quote("#@/<>[]|{}", "/")."]/", $this->request->getName()) === 1) {
65 65
 			$errorList[ValidationError::NAME_INVALIDCHAR] = new ValidationError(ValidationError::NAME_INVALIDCHAR);
66 66
 		}
67 67
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	{
177 177
 		global $enableTitleblacklist;
178 178
 		if ($enableTitleblacklist == 1) {
179
-			$apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=" . urlencode($this->request->getName()) . "&tbaction=new-account&tbnooverride&format=php");
179
+			$apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=".urlencode($this->request->getName())."&tbaction=new-account&tbnooverride&format=php");
180 180
 
181 181
 			$data = unserialize($apiResult);
182 182
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	{
193 193
 		global $mediawikiWebServiceEndpoint;
194 194
 
195
-		$userexist = file_get_contents($mediawikiWebServiceEndpoint . "?action=query&list=users&ususers=" . urlencode($this->request->getName()) . "&format=php");
195
+		$userexist = file_get_contents($mediawikiWebServiceEndpoint."?action=query&list=users&ususers=".urlencode($this->request->getName())."&format=php");
196 196
 		$ue = unserialize($userexist);
197 197
 		if (!isset ($ue['query']['users']['0']['missing']) && isset ($ue['query']['users']['0']['userid'])) {
198 198
 			return true;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 		global $mediawikiWebServiceEndpoint;
207 207
 
208 208
 		$reqname = str_replace("_", " ", $this->request->getName());
209
-		$userexist = file_get_contents($mediawikiWebServiceEndpoint . "?action=query&meta=globaluserinfo&guiuser=" . urlencode($reqname) . "&format=php");
209
+		$userexist = file_get_contents($mediawikiWebServiceEndpoint."?action=query&meta=globaluserinfo&guiuser=".urlencode($reqname)."&format=php");
210 210
 		$ue = unserialize($userexist);
211 211
 		if (isset ($ue['query']['globaluserinfo']['id'])) {
212 212
 			return true;
Please login to merge, or discard this patch.
functions.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	// Get the closing user's Email signature and append it to the Email.
38 38
 	if (User::getCurrent()->getEmailSig() != "") {
39 39
 		$emailsig = html_entity_decode(User::getCurrent()->getEmailSig(), ENT_QUOTES, "UTF-8");
40
-		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText() . "\n\n" . $emailsig, $headers);
40
+		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText()."\n\n".$emailsig, $headers);
41 41
 	}
42 42
 	else {
43 43
 		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText(), $headers);
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 		}
107 107
 		else {
108 108
 			// This is the login form, not the request form. We need protection here.
109
-			$path = 'https://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
110
-			header("Location: " . $path);
109
+			$path = 'https://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
110
+			header("Location: ".$path);
111 111
 		}
112 112
 	}
113 113
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 function displayPreview($wikicode)
205 205
 {
206
-	$parseresult = unserialize(file_get_contents('http://en.wikipedia.org/w/api.php?action=parse&format=php&text=' . urlencode($wikicode)));
206
+	$parseresult = unserialize(file_get_contents('http://en.wikipedia.org/w/api.php?action=parse&format=php&text='.urlencode($wikicode)));
207 207
 	$out = "<br />\n<h3>Preview</h3>\n<div style=\"border: 2px dashed rgb(26, 79, 133);\">\n<div style=\"margin: 20px;\">";
208 208
 	$out .= $parseresult['parse']['text']['*'];
209 209
 	$out .= '</div></div>';
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
  */
294 294
 function welcomerbotRenderSig($creator, $sig)
295 295
 {
296
-	$signature = html_entity_decode($sig) . ' ~~~~~';
297
-	if (!preg_match("/((\[\[[ ]*(w:)?[ ]*(en:)?)|(\{\{subst:))[ ]*User[ ]*:[ ]*" . $creator . "[ ]*(\]\]|\||\}\}|\/)/i", $signature)) {
296
+	$signature = html_entity_decode($sig).' ~~~~~';
297
+	if (!preg_match("/((\[\[[ ]*(w:)?[ ]*(en:)?)|(\{\{subst:))[ ]*User[ ]*:[ ]*".$creator."[ ]*(\]\]|\||\}\}|\/)/i", $signature)) {
298 298
 		$signature = "--[[User:$creator|$creator]] ([[User talk:$creator|talk]]) ~~~~~";
299 299
 	}
300 300
 	return $signature;
@@ -332,25 +332,25 @@  discard block
 block discarded – undo
332 332
 		$pluralise = false;
333 333
 	}
334 334
 	elseif ($secs > 10 && $secs < $minuteCut) {
335
-		$output = round($secs / $second) . " second";
335
+		$output = round($secs / $second)." second";
336 336
 	}
337 337
 	elseif ($secs >= $minuteCut && $secs < $hourCut) {
338
-		$output = round($secs / $minute) . " minute";
338
+		$output = round($secs / $minute)." minute";
339 339
 	}
340 340
 	elseif ($secs >= $hourCut && $secs < $dayCut) {
341
-		$output = round($secs / $hour) . " hour";
341
+		$output = round($secs / $hour)." hour";
342 342
 	}
343 343
 	elseif ($secs >= $dayCut && $secs < $weekCut) {
344
-		$output = round($secs / $day) . " day";
344
+		$output = round($secs / $day)." day";
345 345
 	}
346 346
 	elseif ($secs >= $weekCut && $secs < $month) {
347
-		$output = round($secs / $week) . " week";
347
+		$output = round($secs / $week)." week";
348 348
 	}
349 349
 	elseif ($secs >= $month && $secs < $year) {
350
-		$output = round($secs / $month) . " month";
350
+		$output = round($secs / $month)." month";
351 351
 	}
352 352
 	elseif ($secs >= $year && $secs < $year * 10) {
353
-		$output = round($secs / $year) . " year";
353
+		$output = round($secs / $year)." year";
354 354
 	}
355 355
 	else {
356 356
 		$output = "a long time ago";
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 	}
359 359
     
360 360
 	if ($pluralise) {
361
-		$output = (substr($output, 0, 2) <> "1 ") ? $output . "s ago" : $output . " ago";
361
+		$output = (substr($output, 0, 2) <> "1 ") ? $output."s ago" : $output." ago";
362 362
 	}
363 363
 
364 364
 	return $output;
@@ -404,9 +404,9 @@  discard block
 block discarded – undo
404 404
 {
405 405
 	$userList = "";
406 406
 	foreach ($users as $v) {
407
-		$userList .= "\"" . htmlentities($v) . "\", ";
407
+		$userList .= "\"".htmlentities($v)."\", ";
408 408
 	}
409
-	$userList = "[" . rtrim($userList, ", ") . "]";
409
+	$userList = "[".rtrim($userList, ", ")."]";
410 410
 	$tailscript = <<<JS
411 411
 $('.username-typeahead').typeahead({
412 412
 	source: {$userList}
Please login to merge, or discard this patch.
zoompage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	$viewableDataStatement->bindValue(":email", $request->getEmail());
66 66
 	$viewableDataStatement->bindValue(":reserved", User::getCurrent()->getId());
67 67
 	$viewableDataStatement->bindValue(":trustedIp", $request->getTrustedIp());
68
-	$viewableDataStatement->bindValue(":trustedProxy", '%' . $request->getTrustedIp() . '%');
68
+	$viewableDataStatement->bindValue(":trustedProxy", '%'.$request->getTrustedIp().'%');
69 69
     
70 70
 	$viewableDataStatement->execute();
71 71
     
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 	#endregion
78 78
 	
79 79
 	if ($request->getStatus() == "Closed") {
80
-		$hash = md5($request->getId() . $request->getEmail() . $request->getTrustedIp() . microtime()); //If the request is closed, change the hash based on microseconds similar to the checksums.
80
+		$hash = md5($request->getId().$request->getEmail().$request->getTrustedIp().microtime()); //If the request is closed, change the hash based on microseconds similar to the checksums.
81 81
 		$smarty->assign("isclosed", true);
82 82
 	}
83 83
 	else {
84
-		$hash = md5($request->getId() . $request->getEmail() . $request->getTrustedIp());
84
+		$hash = md5($request->getId().$request->getEmail().$request->getTrustedIp());
85 85
 		$smarty->assign("isclosed", false);
86 86
 	}
87 87
 	$smarty->assign("hash", $hash);
@@ -257,10 +257,10 @@  discard block
 block discarded – undo
257 257
 	$userListData = $userListResult->fetchAll(PDO::FETCH_COLUMN);
258 258
 	$userListProcessedData = array();
259 259
 	foreach ($userListData as $userListItem) {
260
-		$userListProcessedData[] = "\"" . htmlentities($userListItem) . "\"";
260
+		$userListProcessedData[] = "\"".htmlentities($userListItem)."\"";
261 261
 	}
262 262
     
263
-	$userList = '[' . implode(",", $userListProcessedData) . ']';	
263
+	$userList = '['.implode(",", $userListProcessedData).']';	
264 264
 	$smarty->assign("jsuserlist", $userList);
265 265
 	// end: assign to user
266 266
     
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 		if (count($validationErrors) > 0) {
128 128
 			foreach ($validationErrors as $validationError) {
129 129
 				BootstrapSkin::displayAlertBox(
130
-					$smarty->fetch("validation/" . $validationError->getErrorCode() . ".tpl"),
130
+					$smarty->fetch("validation/".$validationError->getErrorCode().".tpl"),
131 131
 					"alert-error");
132 132
 			}
133 133
             
Please login to merge, or discard this patch.
oauth/OAuthUtility.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	{
25 25
 		global $toolUserAgent;
26 26
 
27
-		$endpoint = $this->baseUrlInternal . '/initiate&format=json&oauth_callback=oob';
27
+		$endpoint = $this->baseUrlInternal.'/initiate&format=json&oauth_callback=oob';
28 28
 
29 29
 		$c = new OAuthConsumer($this->consumerToken, $this->consumerSecret);
30 30
 		$parsed = parse_url($endpoint);
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$data = curl_exec($ch);
44 44
 
45 45
 		if (!$data) {
46
-			throw new Exception('Curl error: ' . curl_error($ch));
46
+			throw new Exception('Curl error: '.curl_error($ch));
47 47
 		}
48 48
 
49 49
 		$token = json_decode($data);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	{
65 65
 		global $toolUserAgent;
66 66
 
67
-		$endpoint = $this->baseUrlInternal . '/token&format=json';
67
+		$endpoint = $this->baseUrlInternal.'/token&format=json';
68 68
 
69 69
 		$c = new OAuthConsumer($this->consumerToken, $this->consumerSecret);
70 70
 		$rc = new OAuthConsumer($requestToken, $requestSecret);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$data = curl_exec($ch);
89 89
 
90 90
 		if (!$data) {
91
-			throw new Exception('Curl error: ' . curl_error($ch));
91
+			throw new Exception('Curl error: '.curl_error($ch));
92 92
 		}
93 93
 
94 94
 		$token = json_decode($data);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 		$ch = curl_init();
122 122
 		if ($method == "GET") {
123
-			curl_setopt($ch, CURLOPT_URL, $mediawikiWebServiceEndpoint . "?" . http_build_query($apiParams));
123
+			curl_setopt($ch, CURLOPT_URL, $mediawikiWebServiceEndpoint."?".http_build_query($apiParams));
124 124
 		}
125 125
         
126 126
 		if ($method == "POST") {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		$data = curl_exec($ch);
139 139
 
140 140
 		if (!$data) {
141
-			throw new Exception('Curl error: ' . curl_error($ch));
141
+			throw new Exception('Curl error: '.curl_error($ch));
142 142
 		}
143 143
 
144 144
 		return json_decode($data);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
 		global $toolUserAgent;
151 151
 
152
-		$endpoint = $this->baseUrlInternal . '/identify&format=json';
152
+		$endpoint = $this->baseUrlInternal.'/identify&format=json';
153 153
 
154 154
 		$c = new OAuthConsumer($this->consumerToken, $this->consumerSecret);
155 155
 		$rc = new OAuthToken($accessToken, $accessSecret);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		$data = curl_exec($ch);
173 173
 
174 174
 		if (!$data) {
175
-			throw new Exception('Curl error: ' . curl_error($ch));
175
+			throw new Exception('Curl error: '.curl_error($ch));
176 176
 		}
177 177
 
178 178
 		$decodedData = json_decode($data);
Please login to merge, or discard this patch.
includes/DataObjects/User.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
     
655 655
 	public function isCheckuser()
656 656
 	{
657
-	    if($this->isCheckuserCache === null) {
657
+	    if ($this->isCheckuserCache === null) {
658 658
 	        $this->isCheckuserCache = $this->checkuser == 1 || $this->oauthCanCheckUser();
659 659
         }
660 660
 
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 				prepare("UPDATE user SET oauthidentitycache = null WHERE id = :id;")->
795 795
 				execute(array(":id" => $this->id));
796 796
 
797
-			SessionAlert::warning("OAuth error getting identity from MediaWiki: " . $ex->getMessage());
797
+			SessionAlert::warning("OAuth error getting identity from MediaWiki: ".$ex->getMessage());
798 798
 		}   
799 799
 	}
800 800
     
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
     
870 870
 	public function getForgottenPasswordHash()
871 871
 	{
872
-		return md5($this->username . $this->email . $this->welcome_template . $this->id . $this->password);
872
+		return md5($this->username.$this->email.$this->welcome_template.$this->id.$this->password);
873 873
 	}
874 874
 
875 875
 	public function getApprovalDate()
@@ -894,6 +894,6 @@  discard block
 block discarded – undo
894 894
 	
895 895
 	public function getObjectDescription()
896 896
 	{
897
-		return '<a href="statistics.php?page=Users&amp;user=' . $this->getId() . '">' . htmlentities($this->username) . "</a>";
897
+		return '<a href="statistics.php?page=Users&amp;user='.$this->getId().'">'.htmlentities($this->username)."</a>";
898 898
 	}
899 899
 }
Please login to merge, or discard this patch.