Failed Conditions
Branch newinternal (104de7)
by Simon
09:33
created
includes/Helpers/Logger.php 3 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 use Waca\DataObjects\Ban;
7 7
 use Waca\DataObjects\Comment;
8 8
 use Waca\DataObjects\EmailTemplate;
9
-use Waca\DataObjects\SiteNotice;
10 9
 use Waca\DataObjects\Log;
11 10
 use Waca\DataObjects\Request;
11
+use Waca\DataObjects\SiteNotice;
12 12
 use Waca\DataObjects\User;
13 13
 use Waca\DataObjects\WelcomeTemplate;
14 14
 use Waca\PdoDatabase;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 		}
54 54
 
55 55
 		$objectType = get_class($object);
56
-		if(strpos($objectType, 'Waca\\DataObjects\\') !== false)
56
+		if (strpos($objectType, 'Waca\\DataObjects\\') !== false)
57 57
 		{
58 58
 			$objectType = str_replace('Waca\\DataObjects\\', '', $objectType);
59 59
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
 		}
54 54
 
55 55
 		$objectType = get_class($object);
56
-		if(strpos($objectType, 'Waca\\DataObjects\\') !== false)
57
-		{
56
+		if(strpos($objectType, 'Waca\\DataObjects\\') !== false) {
58 57
 			$objectType = str_replace('Waca\\DataObjects\\', '', $objectType);
59 58
 		}
60 59
 
Please login to merge, or discard this patch.
includes/Pages/PageSearch.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	/**
69 69
 	 * Gets search results by name
70 70
 	 *
71
-	 * @param $searchTerm string
71
+	 * @param null|string $searchTerm string
72 72
 	 *
73 73
 	 * @returns array<Request>
74 74
 	 */
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 	/**
86 86
 	 * Gets search results by email
87 87
 	 *
88
-	 * @param $searchTerm string
88
+	 * @param null|string $searchTerm string
89 89
 	 *
90
-	 * @return array <Request>
90
+	 * @return Request[] <Request>
91 91
 	 * @throws ApplicationLogicException
92 92
 	 */
93 93
 	private function getEmailSearchResults($searchTerm)
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	/**
108 108
 	 * Gets search results by IP address or XFF IP address
109 109
 	 *
110
-	 * @param $searchTerm string
110
+	 * @param null|string $searchTerm string
111 111
 	 *
112 112
 	 * @returns array<Request>
113 113
 	 */
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 	}
135 135
 
136 136
 	/**
137
-	 * @param $searchType
138
-	 * @param $searchTerm
137
+	 * @param null|string $searchType
138
+	 * @param null|string $searchTerm
139 139
 	 *
140 140
 	 * @throws ApplicationLogicException
141 141
 	 */
Please login to merge, or discard this patch.
includes/Router/RequestRouter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -423,7 +423,7 @@
 block discarded – undo
423 423
 	}
424 424
 
425 425
 	/**
426
-	 * @return callable
426
+	 * @return string[]
427 427
 	 */
428 428
 	protected function getDefaultRoute()
429 429
 	{
Please login to merge, or discard this patch.
includes/DataObject.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
 	/**
132 132
 	 * @return bool
133 133
 	 */
134
-	public function isNew(){
134
+	public function isNew() {
135 135
 		return $this->id === null;
136 136
 	}
137 137
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,8 @@
 block discarded – undo
131 131
 	/**
132 132
 	 * @return bool
133 133
 	 */
134
-	public function isNew(){
134
+	public function isNew()
135
+	{
135 136
 		return $this->id === null;
136 137
 	}
137 138
 }
Please login to merge, or discard this patch.
includes/DataObjects/Ban.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 				throw new Exception($statement->errorInfo());
164 164
 			}
165 165
 
166
-			if($statement->rowCount() !== 1){
166
+			if ($statement->rowCount() !== 1) {
167 167
 				throw new OptimisticLockFailedException();
168 168
 			}
169 169
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 				throw new Exception($statement->errorInfo());
164 164
 			}
165 165
 
166
-			if($statement->rowCount() !== 1){
166
+			if($statement->rowCount() !== 1) {
167 167
 				throw new OptimisticLockFailedException();
168 168
 			}
169 169
 
Please login to merge, or discard this patch.
includes/Pages/PagePreferences.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 			$newPasswordConfirmation = WebRequest::postString('newpasswordconfirm');
58 58
 
59 59
 			$user = User::getCurrent($this->getDatabase());
60
-			if(!$user instanceof User){
60
+			if (!$user instanceof User) {
61 61
 				throw new ApplicationLogicException('User not found');
62 62
 			}
63 63
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 			$newPasswordConfirmation = WebRequest::postString('newpasswordconfirm');
58 58
 
59 59
 			$user = User::getCurrent($this->getDatabase());
60
-			if(!$user instanceof User){
60
+			if(!$user instanceof User) {
61 61
 				throw new ApplicationLogicException('User not found');
62 62
 			}
63 63
 
Please login to merge, or discard this patch.
includes/Pages/Statistics/StatsUsers.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@
 block discarded – undo
103 103
 		$this->assign("notcreated", $usersNotCreated);
104 104
 
105 105
 		list($logs, $logCount) = LogHelper::getLogs($database, null, null, 'User', $user->getId());
106
-		if($logs === false){
106
+		if ($logs === false) {
107 107
 			$this->assign('accountlog', array());
108
-		} else{
108
+		} else {
109 109
 			list($users, $logData) = LogHelper::prepareLogsForTemplate($logs, $database, $this->getSiteConfiguration());
110 110
 
111 111
 			$this->assign("accountlog", $logData);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,9 +103,10 @@
 block discarded – undo
103 103
 		$this->assign("notcreated", $usersNotCreated);
104 104
 
105 105
 		list($logs, $logCount) = LogHelper::getLogs($database, null, null, 'User', $user->getId());
106
-		if($logs === false){
106
+		if($logs === false) {
107 107
 			$this->assign('accountlog', array());
108
-		} else{
108
+		}
109
+		else {
109 110
 			list($users, $logData) = LogHelper::prepareLogsForTemplate($logs, $database, $this->getSiteConfiguration());
110 111
 
111 112
 			$this->assign("accountlog", $logData);
Please login to merge, or discard this patch.
includes/Helpers/LogHelper.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: stwalkerster
5
- * Date: 26/03/2016
6
- * Time: 02:55
7
- */
3
+	 * Created by PhpStorm.
4
+	 * User: stwalkerster
5
+	 * Date: 26/03/2016
6
+	 * Time: 02:55
7
+	 */
8 8
 
9 9
 namespace Waca\Helpers;
10 10
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -451,13 +451,13 @@
 block discarded – undo
451 451
 			$objectDescription = self::getObjectDescription($logEntry->getObjectId(), $logEntry->getObjectType(),
452 452
 				$database, $configuration);
453 453
 
454
-			if($logEntry->getAction() === 'Renamed'){
454
+			if ($logEntry->getAction() === 'Renamed') {
455 455
 				$renameData = unserialize($logEntry->getComment());
456 456
 				$oldName = htmlentities($renameData['old'], ENT_COMPAT, 'UTF-8');
457 457
 				$newName = htmlentities($renameData['new'], ENT_COMPAT, 'UTF-8');
458 458
 				$comment = 'Renamed \'' . $oldName . '\' to \'' . $newName . '\'.';
459 459
 			}
460
-			else{
460
+			else {
461 461
 				$comment = $logEntry->getComment();
462 462
 			}
463 463
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -451,13 +451,13 @@
 block discarded – undo
451 451
 			$objectDescription = self::getObjectDescription($logEntry->getObjectId(), $logEntry->getObjectType(),
452 452
 				$database, $configuration);
453 453
 
454
-			if($logEntry->getAction() === 'Renamed'){
454
+			if($logEntry->getAction() === 'Renamed') {
455 455
 				$renameData = unserialize($logEntry->getComment());
456 456
 				$oldName = htmlentities($renameData['old'], ENT_COMPAT, 'UTF-8');
457 457
 				$newName = htmlentities($renameData['new'], ENT_COMPAT, 'UTF-8');
458 458
 				$comment = 'Renamed \'' . $oldName . '\' to \'' . $newName . '\'.';
459 459
 			}
460
-			else{
460
+			else {
461 461
 				$comment = $logEntry->getComment();
462 462
 			}
463 463
 
Please login to merge, or discard this patch.
includes/Helpers/RequestSearchHelper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	 *
43 43
 	 * @return RequestSearchHelper
44 44
 	 */
45
-	public static function get(PdoDatabase $database){
45
+	public static function get(PdoDatabase $database) {
46 46
 		$helper = new RequestSearchHelper($database);
47 47
 
48 48
 		return $helper;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@
 block discarded – undo
42 42
 	 *
43 43
 	 * @return RequestSearchHelper
44 44
 	 */
45
-	public static function get(PdoDatabase $database){
45
+	public static function get(PdoDatabase $database)
46
+	{
46 47
 		$helper = new RequestSearchHelper($database);
47 48
 
48 49
 		return $helper;
Please login to merge, or discard this patch.