Test Failed
Push — master ( 0b753f...3b3a9e )
by Michael
02:22
created
includes/DataObjects/Notification.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		$blacklist = array("DCC", "CCTP", "PRIVMSG");
99 99
 		$message = str_replace($blacklist, "(IRC Blacklist)", $message); //Lets stop DCC etc
100 100
 
101
-		$msg = IrcColourCode::RESET . IrcColourCode::BOLD . "[$whichami]" . IrcColourCode::RESET . ": $message";
101
+		$msg = IrcColourCode::RESET.IrcColourCode::BOLD."[$whichami]".IrcColourCode::RESET.": $message";
102 102
 
103 103
 		try {
104 104
 			$database = gGetDb('notifications');
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	public static function userApproved(User $user)
138 138
 	{
139
-		self::send("{$user->getUsername()} approved by " . User::getCurrent()->getUsername());
139
+		self::send("{$user->getUsername()} approved by ".User::getCurrent()->getUsername());
140 140
 	}
141 141
 
142 142
 	/**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 */
146 146
 	public static function userPromoted(User $user)
147 147
 	{
148
-		self::send("{$user->getUsername()} promoted to tool admin by " . User::getCurrent()->getUsername());
148
+		self::send("{$user->getUsername()} promoted to tool admin by ".User::getCurrent()->getUsername());
149 149
 	}
150 150
 
151 151
 	/**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public static function userDeclined(User $user, $reason)
157 157
 	{
158
-		self::send("{$user->getUsername()} declined by " . User::getCurrent()->getUsername() . " ($reason)");
158
+		self::send("{$user->getUsername()} declined by ".User::getCurrent()->getUsername()." ($reason)");
159 159
 	}
160 160
 
161 161
 	/**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	public static function userDemoted(User $user, $reason)
167 167
 	{
168
-		self::send("{$user->getUsername()} demoted by " . User::getCurrent()->getUsername() . " ($reason)");
168
+		self::send("{$user->getUsername()} demoted by ".User::getCurrent()->getUsername()." ($reason)");
169 169
 	}
170 170
 
171 171
 	/**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	public static function userSuspended(User $user, $reason)
177 177
 	{
178
-		self::send("{$user->getUsername()} suspended by " . User::getCurrent()->getUsername() . " ($reason)");
178
+		self::send("{$user->getUsername()} suspended by ".User::getCurrent()->getUsername()." ($reason)");
179 179
 	}
180 180
 
181 181
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public static function userPrefChange(User $user)
186 186
 	{
187
-		self::send("{$user->getUsername()}'s preferences were changed by " . User::getCurrent()->getUsername());
187
+		self::send("{$user->getUsername()}'s preferences were changed by ".User::getCurrent()->getUsername());
188 188
 	}
189 189
 
190 190
 	/**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	 */
195 195
 	public static function userRenamed(User $user, $old)
196 196
 	{
197
-		self::send(User::getCurrent()->getUsername() . " renamed $old to {$user->getUsername()}");
197
+		self::send(User::getCurrent()->getUsername()." renamed $old to {$user->getUsername()}");
198 198
 	}
199 199
 
200 200
 	#endregion
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	public static function interfaceMessageEdited(InterfaceMessage $message)
209 209
 	{
210
-		self::send("Message {$message->getDescription()} ({$message->getId()}) edited by " . User::getCurrent()->getUsername());
210
+		self::send("Message {$message->getDescription()} ({$message->getId()}) edited by ".User::getCurrent()->getUsername());
211 211
 	}
212 212
 	#endregion
213 213
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 */
219 219
 	public static function welcomeTemplateCreated(WelcomeTemplate $template)
220 220
 	{
221
-		self::send("Welcome template {$template->getId()} created by " . User::getCurrent()->getUsername());
221
+		self::send("Welcome template {$template->getId()} created by ".User::getCurrent()->getUsername());
222 222
 	}
223 223
 
224 224
 	/**
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 */
228 228
 	public static function welcomeTemplateDeleted($templateid)
229 229
 	{
230
-		self::send("Welcome template {$templateid} deleted by " . User::getCurrent()->getUsername());
230
+		self::send("Welcome template {$templateid} deleted by ".User::getCurrent()->getUsername());
231 231
 	}
232 232
 
233 233
 	/**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	public static function welcomeTemplateEdited(WelcomeTemplate $template)
238 238
 	{
239
-		self::send("Welcome template {$template->getId()} edited by " . User::getCurrent()->getUsername());
239
+		self::send("Welcome template {$template->getId()} edited by ".User::getCurrent()->getUsername());
240 240
 	}
241 241
 
242 242
 	#endregion
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 			$duration = "indefinitely";
253 253
 		}
254 254
 		else {
255
-			$duration = "until " . date("F j, Y, g:i a", $ban->getDuration());
255
+			$duration = "until ".date("F j, Y, g:i a", $ban->getDuration());
256 256
 		}
257 257
 
258 258
 		$username = User::getCurrent()->getUsername();
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	public static function unbanned(Ban $ban, $unbanreason)
269 269
 	{
270
-		self::send($ban->getTarget() . " unbanned by " . User::getCurrent()->getUsername() . " (" . $unbanreason . ")");
270
+		self::send($ban->getTarget()." unbanned by ".User::getCurrent()->getUsername()." (".$unbanreason.")");
271 271
 	}
272 272
 
273 273
 	#endregion
@@ -283,15 +283,15 @@  discard block
 block discarded – undo
283 283
 		global $baseurl;
284 284
 
285 285
 		self::send(
286
-			IrcColourCode::DARK_GREY . "[["
287
-			. IrcColourCode::DARK_GREEN . "acc:"
288
-			. IrcColourCode::ORANGE . $request->getId()
289
-			. IrcColourCode::DARK_GREY . "]]"
290
-			. IrcColourCode::RED . " N "
291
-			. IrcColourCode::DARK_BLUE . $baseurl . "/acc.php?action=zoom&id={$request->getId()} "
292
-			. IrcColourCode::DARK_RED . "* "
293
-			. IrcColourCode::DARK_GREEN . $request->getName()
294
-			. IrcColourCode::DARK_RED . " * "
286
+			IrcColourCode::DARK_GREY."[["
287
+			. IrcColourCode::DARK_GREEN."acc:"
288
+			. IrcColourCode::ORANGE.$request->getId()
289
+			. IrcColourCode::DARK_GREY."]]"
290
+			. IrcColourCode::RED." N "
291
+			. IrcColourCode::DARK_BLUE.$baseurl."/acc.php?action=zoom&id={$request->getId()} "
292
+			. IrcColourCode::DARK_RED."* "
293
+			. IrcColourCode::DARK_GREEN.$request->getName()
294
+			. IrcColourCode::DARK_RED." * "
295 295
 			. IrcColourCode::RESET
296 296
 			);
297 297
 	}
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 	 */
435 435
 	public static function emailCreated(EmailTemplate $template)
436 436
 	{
437
-		self::send("Email {$template->getId()} ({$template->getName()}) created by " . User::getCurrent()->getUsername());
437
+		self::send("Email {$template->getId()} ({$template->getName()}) created by ".User::getCurrent()->getUsername());
438 438
 	}
439 439
 
440 440
 	/**
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	 */
444 444
 	public static function emailEdited(EmailTemplate $template)
445 445
 	{
446
-		self::send("Email {$template->getId()} ({$template->getName()}) edited by " . User::getCurrent()->getUsername());
446
+		self::send("Email {$template->getId()} ({$template->getName()}) edited by ".User::getCurrent()->getUsername());
447 447
 	}
448 448
 
449 449
 	#endregion
Please login to merge, or discard this patch.
includes/DataObjects/InterfaceMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,6 +118,6 @@
 block discarded – undo
118 118
 	
119 119
 	public function getObjectDescription()
120 120
 	{
121
-		return '<a href="acc.php?action=messagemgmt&amp;view=' . $this->getId() . '">' . htmlentities($this->description) . "</a>";
121
+		return '<a href="acc.php?action=messagemgmt&amp;view='.$this->getId().'">'.htmlentities($this->description)."</a>";
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
includes/DataObjects/WelcomeTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,6 +108,6 @@
 block discarded – undo
108 108
 	
109 109
 	public function getObjectDescription()
110 110
 	{
111
-		return '<a href="acc.php?action=templatemgmt&amp;view=' . $this->getId() . '">' . htmlentities($this->usercode) . "</a>";
111
+		return '<a href="acc.php?action=templatemgmt&amp;view='.$this->getId().'">'.htmlentities($this->usercode)."</a>";
112 112
 	}
113 113
 }
Please login to merge, or discard this patch.
includes/DataObjects/Ban.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -258,6 +258,6 @@
 block discarded – undo
258 258
 	
259 259
 	public function getObjectDescription()
260 260
 	{
261
-		return 'Ban #' . $this->getId() . " (" . htmlentities($this->target) . ")</a>";
261
+		return 'Ban #'.$this->getId()." (".htmlentities($this->target).")</a>";
262 262
 	}
263 263
 }
Please login to merge, or discard this patch.
includes/DataObjects/Log.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
 		$object = $type::getById($this->objectid, $this->dbObject);
156 156
 
157 157
 		if ($object === false) {
158
-			return '[' . $this->objecttype . " " . $this->objectid . ']';
158
+			return '['.$this->objecttype." ".$this->objectid.']';
159 159
 		}
160 160
 		
161 161
 		return $object->getObjectDescription();
Please login to merge, or discard this patch.
includes/StatisticsPage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 	public static function Create($pageName)
24 24
 	{
25 25
 		// calculate the name of the statistics page
26
-		$statsPage = "Stats" . $pageName;
26
+		$statsPage = "Stats".$pageName;
27 27
 
28 28
 		global $filepath;
29 29
 		// check the stats page definition exists...
30
-		if (file_exists($filepath . "/includes/statistics/Stats" . $pageName . ".php")) {
30
+		if (file_exists($filepath."/includes/statistics/Stats".$pageName.".php")) {
31 31
 		// and include it.
32
-			require_once($filepath . "/includes/statistics/Stats" . $pageName . ".php");
32
+			require_once($filepath."/includes/statistics/Stats".$pageName.".php");
33 33
 		}
34 34
 		else {
35 35
 			// class def doesn't exist: error
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		}
57 57
 		else {
58 58
 			// file exists, but no definition of the class
59
-			die("No definition for statistics page: " . $statsPage);
59
+			die("No definition for statistics page: ".$statsPage);
60 60
 		}
61 61
 	}
62 62
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		}
146 146
 
147 147
 		// not protected or access allowed
148
-		echo '<div class="page-header"><h1>' . $this->getPageTitle() . '</h1></div>';
148
+		echo '<div class="page-header"><h1>'.$this->getPageTitle().'</h1></div>';
149 149
 
150 150
 		if ($this->requiresSimpleHtmlEnvironment()) {
151 151
 			echo '<div class="row-fluid"><div class="span12">';
Please login to merge, or discard this patch.
redir.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	'bgpview' => 'https://bgpview.io/ip/%DATA%'
14 14
 );
15 15
 
16
-if(!isset($_GET['tool'])
16
+if (!isset($_GET['tool'])
17 17
 	|| !isset($toolList[$_GET['tool']])
18 18
 	|| !isset($_GET['data'])
19 19
 )
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 }
24 24
 
25 25
 if (isset($_GET['round2'])) {
26
-	echo '<script>window.location.href=' . json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])) . '</script>';
26
+	echo '<script>window.location.href='.json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])).'</script>';
27 27
 }
28 28
 else {
29
-	header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
29
+	header("Location: ".$_SERVER["REQUEST_URI"]."&round2=true");
30 30
 }
Please login to merge, or discard this patch.
queryBrowser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,18 +52,18 @@  discard block
 block discarded – undo
52 52
 		$out .= '<table class="table table-striped table-hover table-condensed"><tr>';
53 53
 
54 54
 		if ($this->numberedList == true) {
55
-			$out .= "<th>" . $this->numberedListTitle . "</th>";
55
+			$out .= "<th>".$this->numberedListTitle."</th>";
56 56
 		}
57 57
 
58 58
 		if ($this->overrideTableTitles != false) {
59 59
 			foreach ($this->overrideTableTitles as $value) {
60
-				$out .= "<th>" . $value . "</th>"; 
60
+				$out .= "<th>".$value."</th>"; 
61 61
 			}
62 62
 		}
63 63
 		else {
64 64
 			if (count($results) > 0) {
65 65
 				foreach ($results[0] as $k => $v) {
66
-					$out .= "<th>" . $k . "</th>"; 
66
+					$out .= "<th>".$k."</th>"; 
67 67
 				}
68 68
 			}
69 69
 		}
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 				$out .= '<tr>';
81 81
                 
82 82
 				if ($this->numberedList == true) {
83
-					$out .= "<th>" . $currentreq . "</th>";
83
+					$out .= "<th>".$currentreq."</th>";
84 84
 				}
85 85
 				
86 86
 				
87 87
 				foreach ($row as $cell) {
88 88
 	
89
-					$out .= "<td>" . $cell . "</td>";
89
+					$out .= "<td>".$cell."</td>";
90 90
 				}
91 91
 	
92 92
 				
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
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	// Get the closing user's Email signature and append it to the Email.
43 43
 	if (User::getCurrent()->getEmailSig() != "") {
44 44
 		$emailsig = html_entity_decode(User::getCurrent()->getEmailSig(), ENT_QUOTES, "UTF-8");
45
-		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText() . "\n\n" . $emailsig, $headers);
45
+		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText()."\n\n".$emailsig, $headers);
46 46
 	}
47 47
 	else {
48 48
 		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText(), $headers);
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 		}
112 112
 		else {
113 113
 			// This is the login form, not the request form. We need protection here.
114
-			$path = 'https://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
115
-			header("Location: " . $path);
114
+			$path = 'https://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
115
+			header("Location: ".$path);
116 116
 		}
117 117
 	}
118 118
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
 function displayPreview($wikicode)
211 211
 {
212
-	$parseresult = unserialize(file_get_contents('http://en.wikipedia.org/w/api.php?action=parse&format=php&text=' . urlencode($wikicode)));
212
+	$parseresult = unserialize(file_get_contents('http://en.wikipedia.org/w/api.php?action=parse&format=php&text='.urlencode($wikicode)));
213 213
 	$out = "<br />\n<h3>Preview</h3>\n<div style=\"border: 2px dashed rgb(26, 79, 133);\">\n<div style=\"margin: 20px;\">";
214 214
 	$out .= $parseresult['parse']['text']['*'];
215 215
 	$out .= '</div></div>';
@@ -299,8 +299,8 @@  discard block
 block discarded – undo
299 299
  */
300 300
 function welcomerbotRenderSig($creator, $sig)
301 301
 {
302
-	$signature = html_entity_decode($sig) . ' ~~~~~';
303
-	if (!preg_match("/((\[\[[ ]*(w:)?[ ]*(en:)?)|(\{\{subst:))[ ]*User[ ]*:[ ]*" . $creator . "[ ]*(\]\]|\||\}\}|\/)/i", $signature)) {
302
+	$signature = html_entity_decode($sig).' ~~~~~';
303
+	if (!preg_match("/((\[\[[ ]*(w:)?[ ]*(en:)?)|(\{\{subst:))[ ]*User[ ]*:[ ]*".$creator."[ ]*(\]\]|\||\}\}|\/)/i", $signature)) {
304 304
 		$signature = "--[[User:$creator|$creator]] ([[User talk:$creator|talk]]) ~~~~~";
305 305
 	}
306 306
 	return $signature;
@@ -338,25 +338,25 @@  discard block
 block discarded – undo
338 338
 		$pluralise = false;
339 339
 	}
340 340
 	elseif ($secs > 10 && $secs < $minuteCut) {
341
-		$output = round($secs / $second) . " second";
341
+		$output = round($secs / $second)." second";
342 342
 	}
343 343
 	elseif ($secs >= $minuteCut && $secs < $hourCut) {
344
-		$output = round($secs / $minute) . " minute";
344
+		$output = round($secs / $minute)." minute";
345 345
 	}
346 346
 	elseif ($secs >= $hourCut && $secs < $dayCut) {
347
-		$output = round($secs / $hour) . " hour";
347
+		$output = round($secs / $hour)." hour";
348 348
 	}
349 349
 	elseif ($secs >= $dayCut && $secs < $weekCut) {
350
-		$output = round($secs / $day) . " day";
350
+		$output = round($secs / $day)." day";
351 351
 	}
352 352
 	elseif ($secs >= $weekCut && $secs < $month) {
353
-		$output = round($secs / $week) . " week";
353
+		$output = round($secs / $week)." week";
354 354
 	}
355 355
 	elseif ($secs >= $month && $secs < $year) {
356
-		$output = round($secs / $month) . " month";
356
+		$output = round($secs / $month)." month";
357 357
 	}
358 358
 	elseif ($secs >= $year && $secs < $year * 10) {
359
-		$output = round($secs / $year) . " year";
359
+		$output = round($secs / $year)." year";
360 360
 	}
361 361
 	else {
362 362
 		$output = "a long time ago";
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 	}
365 365
     
366 366
 	if ($pluralise) {
367
-		$output = (substr($output, 0, 2) <> "1 ") ? $output . "s ago" : $output . " ago";
367
+		$output = (substr($output, 0, 2) <> "1 ") ? $output."s ago" : $output." ago";
368 368
 	}
369 369
 
370 370
 	return $output;
@@ -410,9 +410,9 @@  discard block
 block discarded – undo
410 410
 {
411 411
 	$userList = "";
412 412
 	foreach ($users as $v) {
413
-		$userList .= "\"" . htmlentities($v) . "\", ";
413
+		$userList .= "\"".htmlentities($v)."\", ";
414 414
 	}
415
-	$userList = "[" . rtrim($userList, ", ") . "]";
415
+	$userList = "[".rtrim($userList, ", ")."]";
416 416
 	$tailscript = <<<JS
417 417
 $('.username-typeahead').typeahead({
418 418
 	source: {$userList}
Please login to merge, or discard this patch.