Passed
Pull Request — master (#526)
by Michael
06:45
created
ClearOAuthData.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
 
13 13
 $database = gGetDb();
14 14
 
15
-$database->transactionally(function() use ($database)
16
-{
15
+$database->transactionally(function() use ($database) {
17 16
 	$database->exec(<<<SQL
18 17
         UPDATE user 
19 18
         SET 
Please login to merge, or discard this patch.
RecreateTrustedIPs.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,7 @@
 block discarded – undo
87 87
 $database = gGetDb();
88 88
 
89 89
 echo "Executing transaction...\n";
90
-$database->transactionally(function() use ($ip, $database)
91
-{
90
+$database->transactionally(function() use ($ip, $database) {
92 91
 	$database->exec("DELETE FROM xfftrustcache;");
93 92
 
94 93
 	$insert = $database->prepare("INSERT INTO xfftrustcache (ip) VALUES (:ip);");
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@  discard block
 block discarded – undo
71 71
 			return;
72 72
 		}
73 73
         
74
-		$database->transactionally(function() use($database, $request, $smarty)
75
-		{
74
+		$database->transactionally(function() use($database, $request, $smarty) {
76 75
 			if ($request === false) {
77 76
 				throw new TransactionException($smarty->fetch('request/request-not-found.tpl'), "Ooops!");
78 77
 			}
@@ -136,8 +135,7 @@  discard block
 block discarded – undo
136 135
 		else if ($enableEmailConfirm == 1) {
137 136
 			$request->generateEmailConfirmationHash();
138 137
 
139
-			$database->transactionally(function() use($request)
140
-			{
138
+			$database->transactionally(function() use($request) {
141 139
 				$request->save();
142 140
 
143 141
 				// checksum depends on the ID, so we have to save again!
@@ -151,8 +149,7 @@  discard block
 block discarded – undo
151 149
 		}
152 150
 		else {
153 151
 			$request->setEmailConfirm(0); // Since it can't be null
154
-			$database->transactionally(function() use($request)
155
-			{
152
+			$database->transactionally(function() use($request) {
156 153
 				$request->save();
157 154
 				$request->updateChecksum();
158 155
 				$request->save();
Please login to merge, or discard this patch.
includes/DataObjects/User.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -593,8 +593,7 @@  discard block
 block discarded – undo
593 593
     
594 594
 	public function approve()
595 595
 	{
596
-		$this->dbObject->transactionally(function()
597
-		{
596
+		$this->dbObject->transactionally(function() {
598 597
 			$this->status = "User";
599 598
 			$this->save();
600 599
 			Logger::approvedUser($this->dbObject, $this);
@@ -603,8 +602,7 @@  discard block
 block discarded – undo
603 602
     
604 603
 	public function suspend($comment)
605 604
 	{
606
-		$this->dbObject->transactionally(function() use ($comment)
607
-		{
605
+		$this->dbObject->transactionally(function() use ($comment) {
608 606
 			$this->status = "Suspended";
609 607
 			$this->save();
610 608
 			Logger::suspendedUser($this->dbObject, $this, $comment);
@@ -613,8 +611,7 @@  discard block
 block discarded – undo
613 611
     
614 612
 	public function decline($comment)
615 613
 	{
616
-		$this->dbObject->transactionally(function() use ($comment)
617
-		{
614
+		$this->dbObject->transactionally(function() use ($comment) {
618 615
 			$this->status = "Declined";
619 616
 			$this->save();
620 617
 			Logger::declinedUser($this->dbObject, $this, $comment);
@@ -623,8 +620,7 @@  discard block
 block discarded – undo
623 620
     
624 621
 	public function promote()
625 622
 	{
626
-		$this->dbObject->transactionally(function()
627
-		{
623
+		$this->dbObject->transactionally(function() {
628 624
 			$this->status = "Admin";
629 625
 			$this->save();
630 626
 			Logger::promotedUser($this->dbObject, $this);
@@ -633,8 +629,7 @@  discard block
 block discarded – undo
633 629
     
634 630
 	public function demote($comment)
635 631
 	{
636
-		$this->dbObject->transactionally(function() use ($comment)
637
-		{
632
+		$this->dbObject->transactionally(function() use ($comment) {
638 633
 			$this->status = "User";
639 634
 			$this->save();
640 635
 			Logger::demotedUser($this->dbObject, $this, $comment);
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
@@ -217,8 +217,7 @@
 block discarded – undo
217 217
 		
218 218
 		$items = array_merge($logs, $comments);
219 219
 		
220
-		$sortKey = function(DataObject $item)
221
-		{
220
+		$sortKey = function(DataObject $item) {
222 221
 			if ($item instanceof Log) {
223 222
 				return $item->getTimestamp();
224 223
 			}
Please login to merge, or discard this patch.
redir.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
 if(!isset($_GET['tool'])
13 13
 	|| !isset($toolList[$_GET['tool']])
14 14
 	|| !isset($_GET['data'])
15
-)
16
-{
15
+) {
17 16
 	header("HTTP/1.1 403 Forbidden");
18 17
 	return;
19 18
 }
Please login to merge, or discard this patch.
includes/BootstrapSkin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,7 @@
 block discarded – undo
102 102
 		$creators = implode(
103 103
 			", ",
104 104
 			array_map(
105
-				function($arg)
106
-				{
105
+				function($arg) {
107 106
 					/** @var User $arg */
108 107
 					return
109 108
 						"<a href=\"statistics.php?page=Users&amp;user="
Please login to merge, or discard this patch.
PrecacheGeolocation.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,13 +62,15 @@
 block discarded – undo
62 62
         echo ". IP location fetch complete.\n";
63 63
         $database->commit();
64 64
         echo ". Committed txn.\n";
65
-    } catch (Exception $ex) {
65
+    }
66
+    catch (Exception $ex) {
66 67
         echo ". Encountered exception: " . $ex->getMessage(). "\n";
67 68
         $database->rollBack();
68 69
         echo ". Rolled back txn\n";
69 70
         throw $ex;
70
-    } finally {
71
-        if($database->hasActiveTransaction()){
71
+    }
72
+    finally {
73
+        if($database->hasActiveTransaction()) {
72 74
             $database->rollBack();
73 75
             echo ". Rolled back txn\n";
74 76
         }
Please login to merge, or discard this patch.
functions.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@
 block discarded – undo
27 27
 $session = new session();
28 28
 
29 29
 /** Initialises the PHP Session */
30
-function initialiseSession() {
30
+function initialiseSession()
31
+{
31 32
     session_start();
32 33
 }
33 34
 
Please login to merge, or discard this patch.