Failed Conditions
Branch newinternal (286d66)
by Simon
03:46
created
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/Router/PublicRequestRouter.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.
redir.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
 	$data = $_GET['data'];
21 21
 	$tool = $_GET['tool'];
22 22
 
23
-	if($tool === 'link')
23
+	if ($tool === 'link')
24 24
 	{
25 25
 		// quick security check - if you want to exploit something, you better be sure your exploit resolves via dns.
26 26
 		// this is not intended to catch everything, just as a quick sanity check.
27
-		if(gethostbyname($data) == $data){
27
+		if (gethostbyname($data) == $data) {
28 28
 			echo 'Error resolving hostname, it doesn\'t look like this domain exists.';
29 29
 			die();
30 30
 		}
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,11 +20,10 @@
 block discarded – undo
20 20
 	$data = $_GET['data'];
21 21
 	$tool = $_GET['tool'];
22 22
 
23
-	if($tool === 'link')
24
-	{
23
+	if($tool === 'link') {
25 24
 		// quick security check - if you want to exploit something, you better be sure your exploit resolves via dns.
26 25
 		// this is not intended to catch everything, just as a quick sanity check.
27
-		if(gethostbyname($data) == $data){
26
+		if(gethostbyname($data) == $data) {
28 27
 			echo 'Error resolving hostname, it doesn\'t look like this domain exists.';
29 28
 			die();
30 29
 		}
Please login to merge, or discard this patch.
includes/Pages/Request/PageConfirmEmail.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,14 +56,14 @@
 block discarded – undo
56 56
 		try {
57 57
 			$request->save();
58 58
 		}
59
-		catch(OptimisticLockFailedException $ex){
59
+		catch (OptimisticLockFailedException $ex) {
60 60
 			// Okay. Someone's edited this in the time between us loading this page and doing the checks, and us getting
61 61
 			// to saving the page. We *do not* want to show an optimistic lock failure, the most likely problem is they
62 62
 			// double-loaded this page (see #255). Let's confirm this, and bomb out with a success message if it's the
63 63
 			// case.
64 64
 
65 65
 			$request = Request::getById($id, $this->getDatabase());
66
-			if($request->getEmailConfirm() === 'Confirmed') {
66
+			if ($request->getEmailConfirm() === 'Confirmed') {
67 67
 				// we've already done the sanity checks above
68 68
 
69 69
 				$this->redirect('requestSubmitted');
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 		try {
57 57
 			$request->save();
58 58
 		}
59
-		catch(OptimisticLockFailedException $ex){
59
+		catch(OptimisticLockFailedException $ex) {
60 60
 			// Okay. Someone's edited this in the time between us loading this page and doing the checks, and us getting
61 61
 			// to saving the page. We *do not* want to show an optimistic lock failure, the most likely problem is they
62 62
 			// double-loaded this page (see #255). Let's confirm this, and bomb out with a success message if it's the
Please login to merge, or discard this patch.
includes/Tasks/ITask.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -164,6 +164,7 @@
 block discarded – undo
164 164
 
165 165
 	/**
166 166
 	 * @param TorExitProvider $torExitProvider
167
+	 * @return void
167 168
 	 */
168 169
 	public function setTorExitProvider($torExitProvider);
169 170
 }
170 171
\ No newline at end of file
Please login to merge, or discard this patch.
includes/DataObjects/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -414,7 +414,7 @@
 block discarded – undo
414 414
 			. '|' . $this->forwardedip  // } private data not known to those without access
415 415
 			. '|' . $this->useragent    // }
416 416
 			. '|' . $this->email        // }
417
-			. '|' . $this->status;      // to rudimentarily invalidate the token on status change
417
+			. '|' . $this->status; // to rudimentarily invalidate the token on status change
418 418
 
419 419
 		return hash('sha256', $data);
420 420
 	}
Please login to merge, or discard this patch.
includes/Helpers/IrcNotificationHelper.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@
 block discarded – undo
57 57
 	) {
58 58
 		$this->primaryDatabase = $primaryDatabase;
59 59
 
60
-		if(true){
60
+		if (true) {
61 61
 			$this->notificationsDatabase = $notificationsDatabase;
62 62
 			$this->notificationsEnabled = $siteConfiguration->getIrcNotificationsEnabled();
63 63
 		}
64
-		else{
64
+		else {
65 65
 			$this->notificationsEnabled = false;
66 66
 		}
67 67
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@
 block discarded – undo
57 57
 	) {
58 58
 		$this->primaryDatabase = $primaryDatabase;
59 59
 
60
-		if(true){
60
+		if(true) {
61 61
 			$this->notificationsDatabase = $notificationsDatabase;
62 62
 			$this->notificationsEnabled = $siteConfiguration->getIrcNotificationsEnabled();
63 63
 		}
64
-		else{
64
+		else {
65 65
 			$this->notificationsEnabled = false;
66 66
 		}
67 67
 
Please login to merge, or discard this patch.
includes/Helpers/LogHelper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@
 block discarded – undo
273 273
 				$welcomeTemplate = WelcomeTemplate::getById($objectId, $database);
274 274
 
275 275
 				// some old templates have been completely deleted and lost to the depths of time.
276
-				if($welcomeTemplate === false){
276
+				if ($welcomeTemplate === false) {
277 277
 					return "Welcome template #{$objectId}";
278 278
 				} else {
279 279
 					$userCode = htmlentities($welcomeTemplate->getUserCode(), ENT_COMPAT, 'UTF-8');
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -273,9 +273,10 @@
 block discarded – undo
273 273
 				$welcomeTemplate = WelcomeTemplate::getById($objectId, $database);
274 274
 
275 275
 				// some old templates have been completely deleted and lost to the depths of time.
276
-				if($welcomeTemplate === false){
276
+				if($welcomeTemplate === false) {
277 277
 					return "Welcome template #{$objectId}";
278
-				} else {
278
+				}
279
+				else {
279 280
 					$userCode = htmlentities($welcomeTemplate->getUserCode(), ENT_COMPAT, 'UTF-8');
280 281
 					return "<a href=\"{$baseurl}/internal.php/welcomeTemplates/view?template={$objectId}\">{$userCode}</a>";
281 282
 				}
Please login to merge, or discard this patch.