Completed
Pull Request — master (#221)
by Maximilian
10:25 queued 07:13
created
includes/DataObjects/Comment.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 	/**
89 89
 	 * Summary of getUserObject
90
-	 * @return User|null
90
+	 * @return DataObject|null
91 91
 	 */
92 92
 	public function getUserObject()
93 93
 	{
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
 	/**
128 128
 	 * Summary of getRequestObject
129
-	 * @return Request|null
129
+	 * @return DataObject|null
130 130
 	 */
131 131
 	public function getRequestObject()
132 132
 	{
Please login to merge, or discard this patch.
includes/DataObjects/Log.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	
86 86
 	/**
87 87
 	 * Summary of getUserObject
88
-	 * @return User|null
88
+	 * @return DataObject|null
89 89
 	 */
90 90
 	public function getUserObject()
91 91
 	{
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 	/**
96 96
 	 * Summary of setUser
97
-	 * @param int|User $user 
97
+	 * @param User $user 
98 98
 	 */
99 99
 	public function setUser($user)
100 100
 	{
Please login to merge, or discard this patch.
includes/DataObjects/User.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 			$user->setDatabase($database); 
132 132
 
133 133
 			// Using cached data here!
134
-			if($user->getOAuthOnWikiName(true) == $username) {
134
+			if ($user->getOAuthOnWikiName(true) == $username) {
135 135
 				// Success.
136 136
 				return $user;
137 137
 			}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			$user->setDatabase($database); 
145 145
 
146 146
 			// Don't use the cached data, but instead query the API.
147
-			if($user->getOAuthOnWikiName(false) == $username) {
147
+			if ($user->getOAuthOnWikiName(false) == $username) {
148 148
 				// Success.
149 149
 				return $user;
150 150
 			}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 			$u->setDatabase($database);
203 203
 			$u->isNew = false;
204 204
 
205
-			if(! $u->isCheckuser()) {
205
+			if (!$u->isCheckuser()) {
206 206
 				continue;
207 207
 			}
208 208
 
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 			$this->identityCache->aud == $oauthConsumerToken &&
691 691
 			$this->identityCache->iss == $oauthMediaWikiCanonicalServer
692 692
 			) {
693
-			if(
693
+			if (
694 694
 				$useCached || (
695 695
 					DateTime::createFromFormat("U", $this->identityCache->iat) < new DateTime() &&
696 696
 					DateTime::createFromFormat("U", $this->identityCache->exp) > new DateTime()
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 	private function getOAuthOnWikiName($useCached = false)
715 715
 	{
716 716
 		$identity = $this->getOAuthIdentity($useCached);
717
-		if($identity !== null) {
717
+		if ($identity !== null) {
718 718
 			return $identity->username;
719 719
 		}
720 720
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -822,11 +822,13 @@
 block discarded – undo
822 822
     
823 823
 	#endregion
824 824
     
825
-	public function getForgottenPasswordHash() {
825
+	public function getForgottenPasswordHash()
826
+	{
826 827
 		return md5($this->username . $this->email . $this->welcome_template . $this->id . $this->password);
827 828
 	}
828 829
 
829
-	public function getApprovalDate() {
830
+	public function getApprovalDate()
831
+	{
830 832
 		$query = $this->dbObject->prepare(<<<SQL
831 833
 			SELECT timestamp 
832 834
 			FROM log 
Please login to merge, or discard this patch.
includes/Helpers/Logger.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -425,8 +425,7 @@
 block discarded – undo
425 425
 			);
426 426
 		
427 427
 		$statement = $database->query("SELECT CONCAT('Closed ', id) as k, CONCAT('closed (',name,')') as v FROM emailtemplate;");
428
-		foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row)
429
-		{
428
+		foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row) {
430 429
 			$lookup[$row['k']] = $row['v'];
431 430
 		}
432 431
 		
Please login to merge, or discard this patch.
queryBrowser.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,20 +22,20 @@
 block discarded – undo
22 22
 	 */
23 23
 	public $numberedList = false;
24 24
 	
25
-    /**
26
-     * @var string
27
-     */
28
-    public $numberedListTitle = "#";
25
+	/**
26
+	 * @var string
27
+	 */
28
+	public $numberedListTitle = "#";
29 29
 	
30
-    /**
31
-     * @var boolean|callable
32
-     */
33
-    public $tableCallbackFunction = false;
30
+	/**
31
+	 * @var boolean|callable
32
+	 */
33
+	public $tableCallbackFunction = false;
34 34
 	
35
-    /**
36
-     * @var boolean|string[]
37
-     */
38
-    public $overrideTableTitles = false;
35
+	/**
36
+	 * @var boolean|string[]
37
+	 */
38
+	public $overrideTableTitles = false;
39 39
 
40 40
 	/**
41 41
 	 * @var int
Please login to merge, or discard this patch.
includes/DataObjects/EmailTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
 		$statement = $database->prepare("SELECT * FROM `emailtemplate` WHERE defaultaction = :forcreated AND active = 1;");
64 64
 
65
-		if($defaultAction === false) {
65
+		if ($defaultAction === false) {
66 66
 			$statement = $database->prepare(
67 67
 				"SELECT * FROM `emailtemplate` WHERE defaultaction not in ('created', 'not created') AND active = 1;");
68 68
 		}
Please login to merge, or discard this patch.
acc.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
 		if ($_POST['action'] == EmailTemplate::CREATED || $_POST['action'] == EmailTemplate::NOT_CREATED) {
1282 1282
 			$request->setStatus('Closed');
1283 1283
 
1284
-			if($_POST['action'] == EmailTemplate::CREATED){
1284
+			if($_POST['action'] == EmailTemplate::CREATED) {
1285 1285
 				$gem  = 'custom-y';
1286 1286
 				$crea = "Custom, Created";
1287 1287
 			}
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
 		BootstrapSkin::displayInternalFooter();
1332 1332
 		die();		
1333 1333
 	}
1334
-	else{
1334
+	else {
1335 1335
 		// Not a custom close, just a normal close
1336 1336
 	    
1337 1337
 		$request->setStatus('Closed');
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1218,7 +1218,7 @@  discard block
 block discarded – undo
1218 1218
 	if ($gem == 1 && !$exists && !isset($_GET['createoverride'])) {
1219 1219
 		$alertContent = "<p>You have chosen to mark this request as \"created\", but the account does not exist on the English Wikipedia, proceed?</p><br />";
1220 1220
 		$alertContent .= "<div class=\"row-fluid\">";
1221
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] ."&amp;createoverride=yes\">Yes</a>";
1221
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] . "&amp;createoverride=yes\">Yes</a>";
1222 1222
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1223 1223
 		$alertContent .= "</div>";
1224 1224
         
@@ -1286,7 +1286,7 @@  discard block
 block discarded – undo
1286 1286
 		if ($_POST['action'] == EmailTemplate::CREATED || $_POST['action'] == EmailTemplate::NOT_CREATED) {
1287 1287
 			$request->setStatus('Closed');
1288 1288
 
1289
-			if($_POST['action'] == EmailTemplate::CREATED){
1289
+			if ($_POST['action'] == EmailTemplate::CREATED) {
1290 1290
 				$gem  = 'custom-y';
1291 1291
 				$crea = "Custom, Created";
1292 1292
 			}
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
 			BootstrapSkin::displayAlertBox("Sent mail to Request {$request->getId()}", 
1312 1312
 				"alert-success");
1313 1313
 		}
1314
-		else if(array_key_exists($_POST['action'], $availableRequestStates) ) {
1314
+		else if (array_key_exists($_POST['action'], $availableRequestStates)) {
1315 1315
 			// Defer
1316 1316
 
1317 1317
 			$request->setStatus($_POST['action']);
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
 		BootstrapSkin::displayInternalFooter();
1346 1346
 		die();		
1347 1347
 	}
1348
-	else{
1348
+	else {
1349 1349
 		// Not a custom close, just a normal close
1350 1350
 	    
1351 1351
 		$request->setStatus('Closed');
Please login to merge, or discard this patch.
includes/strings.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -35,6 +35,7 @@  discard block
 block discarded – undo
35 35
 	/**
36 36
 	 * Formats a string to be used as a username.
37 37
 	 * @deprecated StringFunctions class
38
+	 * @param string $username
38 39
 	 */
39 40
 	public function struname($username)
40 41
 	{
@@ -50,6 +51,7 @@  discard block
 block discarded – undo
50 51
 	 * from the beginning/end of the Email, as well as immediately before/after
51 52
 	 * the @ in the Email).
52 53
 	 * @deprecated StringFunctions class
54
+	 * @param string $email
53 55
 	 */
54 56
 	public function stremail($email)
55 57
 	{
Please login to merge, or discard this patch.
tests/includes/IrcColourCodeTest.php 4 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 class IrcColourCodeTest extends PHPUnit_Framework_TestCase
4 4
 {
5
-    private $irc;
5
+	private $irc;
6 6
 
7 7
 	public function setUp()
8 8
 	{
@@ -11,62 +11,62 @@  discard block
 block discarded – undo
11 11
 	}
12 12
 
13 13
 	public function tearDown() {
14
-        $this->irc = NULL;
15
-    }
14
+		$this->irc = NULL;
15
+	}
16 16
 
17
-    public function test_colorCodes() {
17
+	public function test_colorCodes() {
18 18
 
19
-        $i = $this->irc;
19
+		$i = $this->irc;
20 20
 
21
-        $this->assertEquals($i::BOLD,"\x02");
22
-        $this->assertEquals($i::ITALIC, "\x09");
23
-        $this->assertEquals($i::STRIKE, "\x13");
24
-        $this->assertEquals($i::UNDERLINE, "\x15");
25
-        $this->assertEquals($i::UNDERLINE2, "\x1f");
26
-        $this->assertEquals($i::REVERSE, "\x16");
27
-        $this->assertEquals($i::RESET, "\x0f");
21
+		$this->assertEquals($i::BOLD,"\x02");
22
+		$this->assertEquals($i::ITALIC, "\x09");
23
+		$this->assertEquals($i::STRIKE, "\x13");
24
+		$this->assertEquals($i::UNDERLINE, "\x15");
25
+		$this->assertEquals($i::UNDERLINE2, "\x1f");
26
+		$this->assertEquals($i::REVERSE, "\x16");
27
+		$this->assertEquals($i::RESET, "\x0f");
28 28
 
29
-        $this->assertEquals($i::WHITE, "\x0300");
30
-        $this->assertEquals($i::BLACK, "\x0301");
31
-        $this->assertEquals($i::DARK_BLUE, "\x0302");
32
-        $this->assertEquals($i::DARK_GREEN, "\x0303");
33
-        $this->assertEquals($i::RED, "\x0304");
34
-        $this->assertEquals($i::DARK_RED, "\x0305");
35
-        $this->assertEquals($i::DARK_VIOLET, "\x0306");
36
-        $this->assertEquals($i::ORANGE, "\x0307");
37
-        $this->assertEquals($i::YELLOW, "\x0308");
38
-        $this->assertEquals($i::LIGHT_GREEN, "\x0309");
39
-        $this->assertEquals($i::CYAN, "\x0310");
40
-        $this->assertEquals($i::LIGHT_CYAN, "\x0311");
41
-        $this->assertEquals($i::BLUE, "\x0312");
42
-        $this->assertEquals($i::VIOLET, "\x0313");
43
-        $this->assertEquals($i::DARK_GREY, "\x0314");
44
-        $this->assertEquals($i::LIGHT_GREY, "\x0315");
29
+		$this->assertEquals($i::WHITE, "\x0300");
30
+		$this->assertEquals($i::BLACK, "\x0301");
31
+		$this->assertEquals($i::DARK_BLUE, "\x0302");
32
+		$this->assertEquals($i::DARK_GREEN, "\x0303");
33
+		$this->assertEquals($i::RED, "\x0304");
34
+		$this->assertEquals($i::DARK_RED, "\x0305");
35
+		$this->assertEquals($i::DARK_VIOLET, "\x0306");
36
+		$this->assertEquals($i::ORANGE, "\x0307");
37
+		$this->assertEquals($i::YELLOW, "\x0308");
38
+		$this->assertEquals($i::LIGHT_GREEN, "\x0309");
39
+		$this->assertEquals($i::CYAN, "\x0310");
40
+		$this->assertEquals($i::LIGHT_CYAN, "\x0311");
41
+		$this->assertEquals($i::BLUE, "\x0312");
42
+		$this->assertEquals($i::VIOLET, "\x0313");
43
+		$this->assertEquals($i::DARK_GREY, "\x0314");
44
+		$this->assertEquals($i::LIGHT_GREY, "\x0315");
45 45
 
46
-        $this->assertNotEquals($i::BOLD,"\x021");
47
-        $this->assertNotEquals($i::ITALIC, "\x091");
48
-        $this->assertNotEquals($i::STRIKE, "\x131");
49
-        $this->assertNotEquals($i::UNDERLINE, "\x151");
50
-        $this->assertNotEquals($i::UNDERLINE2, "\x1f1");
51
-        $this->assertNotEquals($i::REVERSE, "\x161");
52
-        $this->assertNotEquals($i::RESET, "\x0f1");
46
+		$this->assertNotEquals($i::BOLD,"\x021");
47
+		$this->assertNotEquals($i::ITALIC, "\x091");
48
+		$this->assertNotEquals($i::STRIKE, "\x131");
49
+		$this->assertNotEquals($i::UNDERLINE, "\x151");
50
+		$this->assertNotEquals($i::UNDERLINE2, "\x1f1");
51
+		$this->assertNotEquals($i::REVERSE, "\x161");
52
+		$this->assertNotEquals($i::RESET, "\x0f1");
53 53
 
54
-        $this->assertNotEquals($i::WHITE, "\x03001");
55
-        $this->assertNotEquals($i::BLACK, "\x03011");
56
-        $this->assertNotEquals($i::DARK_BLUE, "\x03021");
57
-        $this->assertNotEquals($i::DARK_GREEN, "\x03031");
58
-        $this->assertNotEquals($i::RED, "\x03041");
59
-        $this->assertNotEquals($i::DARK_RED, "\x03051");
60
-        $this->assertNotEquals($i::DARK_VIOLET, "\x03061");
61
-        $this->assertNotEquals($i::ORANGE, "\x03071");
62
-        $this->assertNotEquals($i::YELLOW, "\x03081");
63
-        $this->assertNotEquals($i::LIGHT_GREEN, "\x03091");
64
-        $this->assertNotEquals($i::CYAN, "\x03101");
65
-        $this->assertNotEquals($i::LIGHT_CYAN, "\x03111");
66
-        $this->assertNotEquals($i::BLUE, "\x03121");
67
-        $this->assertNotEquals($i::VIOLET, "\x03131");
68
-        $this->assertNotEquals($i::DARK_GREY, "\x03141");
69
-        $this->assertNotEquals($i::LIGHT_GREY, "\x03151");
70
-    }
54
+		$this->assertNotEquals($i::WHITE, "\x03001");
55
+		$this->assertNotEquals($i::BLACK, "\x03011");
56
+		$this->assertNotEquals($i::DARK_BLUE, "\x03021");
57
+		$this->assertNotEquals($i::DARK_GREEN, "\x03031");
58
+		$this->assertNotEquals($i::RED, "\x03041");
59
+		$this->assertNotEquals($i::DARK_RED, "\x03051");
60
+		$this->assertNotEquals($i::DARK_VIOLET, "\x03061");
61
+		$this->assertNotEquals($i::ORANGE, "\x03071");
62
+		$this->assertNotEquals($i::YELLOW, "\x03081");
63
+		$this->assertNotEquals($i::LIGHT_GREEN, "\x03091");
64
+		$this->assertNotEquals($i::CYAN, "\x03101");
65
+		$this->assertNotEquals($i::LIGHT_CYAN, "\x03111");
66
+		$this->assertNotEquals($i::BLUE, "\x03121");
67
+		$this->assertNotEquals($i::VIOLET, "\x03131");
68
+		$this->assertNotEquals($i::DARK_GREY, "\x03141");
69
+		$this->assertNotEquals($i::LIGHT_GREY, "\x03151");
70
+	}
71 71
 
72 72
 }
Please login to merge, or discard this 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
         $i = $this->irc;
20 20
 
21
-        $this->assertEquals($i::BOLD,"\x02");
21
+        $this->assertEquals($i::BOLD, "\x02");
22 22
         $this->assertEquals($i::ITALIC, "\x09");
23 23
         $this->assertEquals($i::STRIKE, "\x13");
24 24
         $this->assertEquals($i::UNDERLINE, "\x15");
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->assertEquals($i::DARK_GREY, "\x0314");
44 44
         $this->assertEquals($i::LIGHT_GREY, "\x0315");
45 45
 
46
-        $this->assertNotEquals($i::BOLD,"\x021");
46
+        $this->assertNotEquals($i::BOLD, "\x021");
47 47
         $this->assertNotEquals($i::ITALIC, "\x091");
48 48
         $this->assertNotEquals($i::STRIKE, "\x131");
49 49
         $this->assertNotEquals($i::UNDERLINE, "\x151");
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,11 +10,13 @@
 block discarded – undo
10 10
 		$this->irc = new IrcColourCode();
11 11
 	}
12 12
 
13
-	public function tearDown() {
13
+	public function tearDown()
14
+	{
14 15
         $this->irc = NULL;
15 16
     }
16 17
 
17
-    public function test_colorCodes() {
18
+    public function test_colorCodes()
19
+    {
18 20
 
19 21
         $i = $this->irc;
20 22
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 	}
12 12
 
13 13
 	public function tearDown() {
14
-        $this->irc = NULL;
14
+        $this->irc = null;
15 15
     }
16 16
 
17 17
     public function test_colorCodes() {
Please login to merge, or discard this patch.