Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Branch master (287493)
by Dan
06:08
created
tools/testCoursePlotters.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,57 +9,57 @@
 block discarded – undo
9 9
 function testCourseDistances($gameID)
10 10
 {
11 11
 	//Initialise cache for fairness
12
-	$galaxies =& SmrGalaxy::getGameGalaxies($gameID);
12
+	$galaxies = & SmrGalaxy::getGameGalaxies($gameID);
13 13
 	$galaxySectors = array();
14
-	foreach($galaxies as &$galaxy)
14
+	foreach ($galaxies as &$galaxy)
15 15
 	{
16
-		$galaxiesSectors[] =& $galaxy->getSectors();
16
+		$galaxiesSectors[] = & $galaxy->getSectors();
17 17
 	} unset($galaxy);
18 18
 	//Test plotters
19 19
 	$newTime = 0;
20 20
 	$oldTime = 0;
21
-	foreach($galaxiesSectors as &$galaxySectors)
21
+	foreach ($galaxiesSectors as &$galaxySectors)
22 22
 	{
23
-		foreach($galaxySectors as &$galaxySector)
23
+		foreach ($galaxySectors as &$galaxySector)
24 24
 		{
25
-			foreach($galaxiesSectors as &$targetGalaxySectors)
25
+			foreach ($galaxiesSectors as &$targetGalaxySectors)
26 26
 			{
27
-				foreach($targetGalaxySectors as &$targetGalaxySector)
27
+				foreach ($targetGalaxySectors as &$targetGalaxySector)
28 28
 				{
29
-					if(!$galaxySector->equals($targetGalaxySector))
29
+					if (!$galaxySector->equals($targetGalaxySector))
30 30
 					{
31 31
 						$time = microtime(true);
32
-						$newDI = getPlotDistanceNew($galaxySector,$targetGalaxySector);
32
+						$newDI = getPlotDistanceNew($galaxySector, $targetGalaxySector);
33 33
 						$newTime += microtime(true) - $time;
34 34
 						
35 35
 						$time = microtime(true);
36
-						$oldDI = getPlotDistanceOld($galaxySector,$targetGalaxySector);
36
+						$oldDI = getPlotDistanceOld($galaxySector, $targetGalaxySector);
37 37
 						$oldTime += microtime(true) - $time;
38 38
 						
39
-						if($newDI!=$oldDI)
39
+						if ($newDI != $oldDI)
40 40
 						{
41
-							echo 'Difference, new: '.$newDI.', old:'.$oldDI.', sector1:'.$galaxySector->getSectorID().', sector2:'.$targetGalaxySector->getSectorID().EOL;
41
+							echo 'Difference, new: ' . $newDI . ', old:' . $oldDI . ', sector1:' . $galaxySector->getSectorID() . ', sector2:' . $targetGalaxySector->getSectorID() . EOL;
42 42
 						}
43 43
 					}
44 44
 				} unset($targetGalaxySector);
45
-				echo 'New time: '.$newTime.', old time:'.$oldTime.EOL;
45
+				echo 'New time: ' . $newTime . ', old time:' . $oldTime . EOL;
46 46
 			} unset($targetGalaxySectors);
47 47
 		} unset($galaxySector);
48 48
 	} unset($galaxySectors);
49
-	echo 'New time: '.$newTime.', old time:'.$oldTime.EOL;
49
+	echo 'New time: ' . $newTime . ', old time:' . $oldTime . EOL;
50 50
 }
51 51
 
52 52
 
53
-function getPlotDistanceNew(SmrSector &$sector,SmrSector &$target)
53
+function getPlotDistanceNew(SmrSector &$sector, SmrSector &$target)
54 54
 {
55
-	$path =& Plotter::findDistanceToX($target, $sector, true);
55
+	$path = & Plotter::findDistanceToX($target, $sector, true);
56 56
 	return $path->getRelativeDistance();
57 57
 }
58 58
 
59
-function getPlotDistanceOld(SmrSector &$sector,SmrSector &$target)
59
+function getPlotDistanceOld(SmrSector &$sector, SmrSector &$target)
60 60
 {
61 61
 	$plotter = new Course_Plotter();
62
-	$plotter->set_course($sector->getSectorID(),$target->getSectorID(),$sector->getGameID());
62
+	$plotter->set_course($sector->getSectorID(), $target->getSectorID(), $sector->getGameID());
63 63
 	$plotter->plot();
64 64
 	$return = $plotter->plotted_course[0];
65 65
 	$plotter->Course_Plotter_Destructor();
Please login to merge, or discard this patch.
tools/irc/channel_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 			'gets up off the ground and roundhouse kicks ' . $nick . ' in the face',
23 23
 			'does an evasive backflip and throws ninja stars at ' . $nick,
24 24
 			'slaps ' . $nick . ' around a bit with a large trout',
25
-			'deflects the slap and deals ' . rand(1,999999) . ' damage to ' . $nick,
25
+			'deflects the slap and deals ' . rand(1, 999999) . ' damage to ' . $nick,
26 26
 			'steals the trout and throws it back in the river'
27 27
 		);
28 28
 		fputs($fp, 'PRIVMSG ' . $channel . ' :' . chr(1) . 'ACTION ' . $slap_responses[rand(0, count($slap_responses) - 1)] . chr(1) . EOL);
Please login to merge, or discard this patch.
tools/irc/irc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 function safefputs($fp, $text) {
154 154
 	stream_set_blocking($fp, false);
155
-	while(readFromStream($fp)!==false);
155
+	while (readFromStream($fp) !== false);
156 156
 	fputs($fp, $text);
157 157
 	stream_set_blocking($fp, true);
158 158
 }
@@ -200,9 +200,9 @@  discard block
 block discarded – undo
200 200
 		return;
201 201
 
202 202
 	//Are they using a linked nick instead
203
-	if(notice_nickserv_registered_user($fp, $rdata))
203
+	if (notice_nickserv_registered_user($fp, $rdata))
204 204
 		return;
205
-	if(notice_nickserv_unknown_user($fp, $rdata))
205
+	if (notice_nickserv_unknown_user($fp, $rdata))
206 206
 		return;
207 207
 
208 208
 	// some nice things
Please login to merge, or discard this patch.
tools/irc/channel_msg_sd.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		echo_r('[SD_SET] by ' . $nick . ' in ' . $channel);
44 44
 
45 45
 		// delete any old entries in the list
46
-		foreach($sds as $key => $value) {
46
+		foreach ($sds as $key => $value) {
47 47
 
48 48
 			if ($value[3] != $channel)
49 49
 				continue;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 		echo_r('[SD_DEL] by ' . $nick . ' in ' . $channel);
82 82
 
83
-		foreach($sds as $key => $sd) {
83
+		foreach ($sds as $key => $sd) {
84 84
 
85 85
 			if ($sd[3] != $channel)
86 86
 				continue;
Please login to merge, or discard this patch.
tools/irc/channel_msg_op.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
 
233 233
 function channel_op_notification($fp, $rdata, $nick, $channel) {
234 234
 	echo_r('[OP_ATTENDANCE_CHECK] ' . $nick);
235
-	if(check_for_registration($account, $player, $fp, $nick, $channel, 'channel_op_notification($fp, \'' . $rdata . '\', \'' . $nick . '\', \'' . $channel . '\');', false)) {
235
+	if (check_for_registration($account, $player, $fp, $nick, $channel, 'channel_op_notification($fp, \'' . $rdata . '\', \'' . $nick . '\', \'' . $channel . '\');', false)) {
236 236
 		return true;
237 237
 	}
238 238
 
Please login to merge, or discard this patch.
tools/irc/server.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
 
81 81
 		global $actions;
82
-		foreach($actions as $key => $action) {
82
+		foreach ($actions as $key => $action) {
83 83
 
84 84
 			// is that a callback for our nick?
85 85
 			if ($action[0] == 'MSG_318' && $nick == $action[2]) {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 					$action[4] = time();
97 97
 					array_push($actions, $action);
98 98
 					fputs($fp, 'NICKSERV INFO ' . $nick . EOL);
99
-				} else if($action[5] === true) {
99
+				} else if ($action[5] === true) {
100 100
 					fputs($fp, 'PRIVMSG ' . $action[1] . ' :' . $nick . ', you are not using a registered nick. Please identify with NICKSERV and try the last command again.' . EOL);
101 101
 				}
102 102
 
Please login to merge, or discard this patch.
tools/irc/notice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		}
25 25
 		
26 26
 		global $actions;
27
-		foreach($actions as $key => $action) {
27
+		foreach ($actions as $key => $action) {
28 28
 
29 29
 			// is that a callback for our nick?
30 30
 			if ($action[0] == 'NICKSERV_INFO' && $nick == $action[2]) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		echo_r('[NOTICE_NICKSERV_UNKNOWN_NICK] ' . $nick);
60 60
 		
61 61
 		global $actions;
62
-		foreach($actions as $key => $action) {
62
+		foreach ($actions as $key => $action) {
63 63
 
64 64
 			// is that a callback for our nick?
65 65
 			if ($action[0] == 'NICKSERV_INFO' && $nick == $action[2]) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 				
69 69
 				unset($actions[$key]);
70 70
 
71
-				if($action[5] === true) {
71
+				if ($action[5] === true) {
72 72
 					fputs($fp, 'PRIVMSG ' . $action[1] . ' :' . $nick . ', you are not using a registered nick. Please identify with NICKSERV and try the last command again.' . EOL);
73 73
 				}
74 74
 
Please login to merge, or discard this patch.
tools/irc/channel_msg.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	$registeredNick = $db->getField('registered_nick');
23 23
 
24 24
 	// get alliance_id and game_id for this channel
25
-	$alliance =& SmrAlliance::getAllianceByIrcChannel($channel, true);
25
+	$alliance = & SmrAlliance::getAllianceByIrcChannel($channel, true);
26 26
 	if ($alliance == null) {
27
-		if($validationMessages === true) {
27
+		if ($validationMessages === true) {
28 28
 			fputs($fp, 'PRIVMSG ' . $channel . ' :' . $nick . ', the channel ' . $channel . ' has not been registered with me.' . EOL);
29 29
 		}
30 30
 		return true;
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 	// get smr account
34 34
 	$account = SmrAccount::getAccountByIrcNick($nick, true);
35 35
 	if ($account == null) {
36
-		if($registeredNick != '') {
36
+		if ($registeredNick != '') {
37 37
 			$account = SmrAccount::getAccountByIrcNick($registeredNick, true);
38 38
 		}
39 39
 		if ($account == null) {
40
-			if($validationMessages === true) {
40
+			if ($validationMessages === true) {
41 41
 				fputs($fp, 'PRIVMSG ' . $channel . ' :' . $nick . ', please set your \'irc nick\' in SMR preferences to your registered nick so i can recognize you.' . EOL);
42 42
 			}
43 43
 			return true;
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 	try {
49 49
 		$player = SmrPlayer::getPlayer($account->getAccountID(), $alliance->getGameId(), true);
50 50
 	}
51
-	catch(PlayerNotFoundException $e) {
52
-		if($validationMessages === true) {
51
+	catch (PlayerNotFoundException $e) {
52
+		if ($validationMessages === true) {
53 53
 			fputs($fp, 'PRIVMSG ' . $channel . ' :' . $nick . ', you have not joined the game that this channel belongs to.' . EOL);
54 54
 		}
55 55
 		return true;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	// is the user part of this alliance? (no need to check for 0, cannot happen at this point in code)
59 59
 	if ($player->getAllianceID() != $alliance->getAllianceID()) {
60
-		if($validationMessages === true) {
60
+		if ($validationMessages === true) {
61 61
 			fputs($fp, 'KICK ' . $channel . ' ' . $nick . ' :You are not a member of this alliance!' . EOL);
62 62
 		}
63 63
 		return true;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			return true;
82 82
 		}
83 83
 		
84
-		if(check_for_registration($account, $player, $fp, $nick, $channel, 'channel_msg_with_registration($fp, \'' . $rdata . '\');')) {
84
+		if (check_for_registration($account, $player, $fp, $nick, $channel, 'channel_msg_with_registration($fp, \'' . $rdata . '\');')) {
85 85
 			return true;
86 86
 		}
87 87
 
Please login to merge, or discard this patch.
tools/remove_semi_exp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 <?php
3 3
 
4 4
 //config file
5
-require( realpath(dirname(__FILE__)) . '/../htdocs/config.inc');
5
+require(realpath(dirname(__FILE__)) . '/../htdocs/config.inc');
6 6
 
7 7
 $db = new SmrMySqlDatabase();
8 8
 $db2 = new SmrMySqlDatabase();
Please login to merge, or discard this patch.