Completed
Pull Request — master (#257)
by Matthew
03:28
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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 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
 	{
Please login to merge, or discard this patch.
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.
ClearOldData.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
 
11 11
 $db = gGetDb( );
12 12
 
13
-$db->transactionally(function() use ($db)
14
-{
13
+$db->transactionally(function() use ($db) {
15 14
 	global $cDataClearIp, $cDataClearEmail, $dataclear_interval;
16 15
     
17 16
 	$query = $db->prepare("UPDATE request SET ip = :ip, forwardedip = null, email = :mail, useragent = '' WHERE date < DATE_SUB(curdate(), INTERVAL $dataclear_interval);");
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.
includes/BootstrapSkin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@
 block discarded – undo
103 103
 		$creators = implode(
104 104
 			", ",
105 105
 			array_map(
106
-				function($arg)
107
-				{
106
+				function($arg) {
108 107
 					global $baseurl;
109 108
 
110 109
 					/** @var User $arg */
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.