Failed Conditions
Push — newinternal-releasecandidate ( 2e1778...b14046 )
by Simon
15:26 queued 05:35
created
includes/Security/CredentialProviders/CredentialProviderBase.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             ':t' => $this->type
56 56
         );
57 57
 
58
-        if($disabled !== null) {
58
+        if ($disabled !== null) {
59 59
             $sql .= ' AND disabled = :d';
60 60
             $parameters[':d'] = $disabled ? 1 : 0;
61 61
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $alternates = $statement->fetchColumn();
110 110
         $statement->closeCursor();
111 111
 
112
-        if($alternates <= 1) {
112
+        if ($alternates <= 1) {
113 113
             // decrement the factor for every stage above this
114 114
             $sql = 'UPDATE credential SET factor = factor - 1 WHERE user = :user AND factor > :factor';
115 115
             $statement = $this->database->prepare($sql);
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@  discard block
 block discarded – undo
93 93
         return $this->configuration;
94 94
     }
95 95
 
96
-    public function deleteCredential(User $user) {
96
+    public function deleteCredential(User $user)
97
+    {
97 98
         // get this factor
98 99
         $statement = $this->database->prepare('SELECT * FROM credential WHERE user = :user AND type = :type');
99 100
         $statement->execute(array(':user' => $user->getId(), ':type' => $this->type));
@@ -143,7 +144,8 @@  discard block
 block discarded – undo
143 144
      *
144 145
      * @return bool
145 146
      */
146
-    public function userIsEnrolled($userId) {
147
+    public function userIsEnrolled($userId)
148
+    {
147 149
         $cred = $this->getCredentialData($userId);
148 150
 
149 151
         return $cred !== null;
Please login to merge, or discard this patch.
includes/Security/EncryptionHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $password = $this->getEncryptionKey();
34 34
         $encryptedKey = openssl_encrypt($secret, 'aes-256-ctr', $password, OPENSSL_RAW_DATA, $iv);
35 35
 
36
-        $data = base64_encode($iv) . '|' . base64_encode($encryptedKey);
36
+        $data = base64_encode($iv).'|'.base64_encode($encryptedKey);
37 37
 
38 38
         return $data;
39 39
     }
Please login to merge, or discard this patch.
smarty-plugins/modifier.nlimplode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     $last = array_pop($list);
18 18
     if ($list) {
19
-        return implode(', ', $list) . ', ' . $conjunction . ' ' . $last;
19
+        return implode(', ', $list).', '.$conjunction.' '.$last;
20 20
     }
21 21
     return $last;
22 22
 }
23 23
\ No newline at end of file
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
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
         $data = urlencode($data);
46 46
     }
47 47
 
48
-    echo '<script>window.location.href=' . json_encode(str_replace("%DATA%", $data, $toolList[$tool])) . '</script>';
48
+    echo '<script>window.location.href='.json_encode(str_replace("%DATA%", $data, $toolList[$tool])).'</script>';
49 49
 }
50 50
 else {
51
-    header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
51
+    header("Location: ".$_SERVER["REQUEST_URI"]."&round2=true");
52 52
 }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
16 16
     'google'             => 'https://www.google.com/search?q=%DATA%',
17 17
     'domain'             => 'http://%DATA%/',
18 18
     'rangefinder'        => 'https://tools.wmflabs.org/rangeblockfinder/?ip=%DATA%',
19
-	'ipcheck'            => 'https://ipcheck.toolforge.org/index.php?ip=%DATA%',
20
-	'bgpview'            => 'https://bgpview.io/ip/%DATA%'
19
+    'ipcheck'            => 'https://ipcheck.toolforge.org/index.php?ip=%DATA%',
20
+    'bgpview'            => 'https://bgpview.io/ip/%DATA%'
21 21
 );
22 22
 
23 23
 if (!isset($_GET['tool'])
Please login to merge, or discard this patch.
includes/DataObjects/GeoLocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public static function getByAddress($address, PdoDatabase $database, $forUpdate = false)
35 35
     {
36 36
         $lockMode = $forUpdate ? ' FOR UPDATE' : '';
37
-        $sql = "SELECT * FROM geolocation WHERE address = :id LIMIT 1" . $lockMode;
37
+        $sql = "SELECT * FROM geolocation WHERE address = :id LIMIT 1".$lockMode;
38 38
 
39 39
         $statement = $database->prepare($sql);
40 40
         $statement->bindValue(":id", $address);
Please login to merge, or discard this patch.
includes/Pages/Registration/PageRegisterBase.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     protected function main()
29 29
     {
30 30
         $useOAuthSignup = $this->getSiteConfiguration()->getUseOAuthSignup();
31
-        if (! $this->getSiteConfiguration()->isRegistrationAllowed()) {
31
+        if (!$this->getSiteConfiguration()->isRegistrationAllowed()) {
32 32
            throw new AccessDeniedException();
33 33
         }
34 34
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     {
33 33
         $useOAuthSignup = $this->getSiteConfiguration()->getUseOAuthSignup();
34 34
         if (! $this->getSiteConfiguration()->isRegistrationAllowed()) {
35
-           throw new AccessDeniedException();
35
+            throw new AccessDeniedException();
36 36
         }
37 37
 
38 38
         // Dual-mode page
Please login to merge, or discard this patch.
includes/ConsoleTasks/PrecacheGeolocationTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
                 echo ". Committed txn.\n";
78 78
             }
79 79
             catch (Exception $ex) {
80
-                echo ". Encountered exception: " . $ex->getMessage() . "\n";
80
+                echo ". Encountered exception: ".$ex->getMessage()."\n";
81 81
                 $database->rollBack();
82 82
                 echo ". Rolled back txn\n";
83 83
                 throw $ex;
Please login to merge, or discard this patch.
includes/Helpers/TypeAheadHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $dataList = '';
24 24
         foreach ($generator() as $dataItem) {
25
-            $dataList .= '"' . htmlentities($dataItem) . '", ';
25
+            $dataList .= '"'.htmlentities($dataItem).'", ';
26 26
         }
27
-        $dataList = "[" . rtrim($dataList, ", ") . "]";
27
+        $dataList = "[".rtrim($dataList, ", ")."]";
28 28
 
29 29
         $script = <<<JS
30 30
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         foreach ($this->definedClasses as $class => $js) {
57
-            $jsBlocks = $js . "\r\n\r\n";
57
+            $jsBlocks = $js."\r\n\r\n";
58 58
         }
59 59
 
60 60
         $data = <<<HTML
Please login to merge, or discard this patch.
includes/Tasks/XmlApiPageBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             $CORSallowed = $this->getSiteConfiguration()->getCrossOriginResourceSharingHosts();
70 70
 
71 71
             if (in_array($httpOrigin, $CORSallowed)) {
72
-                header("Access-Control-Allow-Origin: " . $httpOrigin);
72
+                header("Access-Control-Allow-Origin: ".$httpOrigin);
73 73
             }
74 74
         }
75 75
 
Please login to merge, or discard this patch.