Failed Conditions
Branch newinternal (0e936a)
by Simon
03:37
created
includes/DataObjects/AntiSpoofCache.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -17,6 +17,9 @@
 block discarded – undo
17 17
 	/** @var string */
18 18
 	protected $timestamp;
19 19
 
20
+	/**
21
+	 * @param string $username
22
+	 */
20 23
 	public static function getByUsername($username, PdoDatabase $database)
21 24
 	{
22 25
 		$statement = $database->prepare(<<<SQL
Please login to merge, or discard this patch.
includes/Providers/IpLocationProvider.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@
 block discarded – undo
15 15
 	private $apikey;
16 16
 	private $database;
17 17
 
18
+	/**
19
+	 * @param string $apikey
20
+	 */
18 21
 	public function __construct(PdoDatabase $database, $apikey)
19 22
 	{
20 23
 		$this->database = $database;
Please login to merge, or discard this patch.
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.