Passed
Branch master (1e7e1e)
by Kris
01:37
created
lib/ApiHandler.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function report(string $ip = '', string $categories = '', string $message = '', bool $returnArray = false)
135 135
     {
136
-         // ip must be set
136
+            // ip must be set
137 137
         if (empty($ip)){
138 138
             throw new \InvalidArgumentException('Ip was empty');
139 139
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
 
146 146
         // message must be set
147
-          if (empty($message)){
147
+            if (empty($message)){
148 148
             throw new \InvalidArgumentException('report message was empty');
149 149
         }
150 150
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
         // option
287 287
         if ($verbose){
288
-           $data['verbose'] = true;
288
+            $data['verbose'] = true;
289 289
         }
290 290
 
291 291
         $response = $this->apiRequest('check', $data, 'GET') ;
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
      * @access public
467 467
      * @param string      $message           The original message 
468 468
      *  
469
-	 * @return string
469
+     * @return string
470 470
      */
471 471
     protected function cleanMessage(string $message)
472 472
     {
@@ -491,10 +491,10 @@  discard block
 block discarded – undo
491 491
      *
492 492
      * @access public
493 493
      * @static
494
-	 * @param string    $filePath       The file's full path
495
-	 * @param bool      $throwError     Throw error on true or silent process. Default is true
494
+     * @param string    $filePath       The file's full path
495
+     * @param bool      $throwError     Throw error on true or silent process. Default is true
496 496
      *  
497
-	 * @return object|null 
497
+     * @return object|null 
498 498
      * @throws \Exception
499 499
      * @throws \LogicException
500 500
      */
@@ -502,10 +502,10 @@  discard block
 block discarded – undo
502 502
     {
503 503
         // check file exists
504 504
         if (!file_exists($filePath) || !is_file($filePath)){
505
-           if ($throwError) {
505
+            if ($throwError) {
506 506
                 throw new \Exception('Config file not found');
507
-           }
508
-           return null;  
507
+            }
508
+            return null;  
509 509
         }
510 510
 
511 511
         // get and parse content
Please login to merge, or discard this patch.
lib/ApiBase.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
         // Open proxy, open relay, or Tor exit node.
71 71
         ['openproxy'       , '9', 'Open Proxy', true],        
72 72
 
73
-         // Comment/forum spam, HTTP referer spam, or other CMS spam.
74
-         ['webspam'         , '10', 'Web Spam', true],        
73
+            // Comment/forum spam, HTTP referer spam, or other CMS spam.
74
+            ['webspam'         , '10', 'Web Spam', true],        
75 75
 
76 76
         // Spam email content, infected attachments, and phishing emails. Note: Limit comments to only relevent
77 77
         // information (instead of log dumps) and be sure to remove PII if you want to remain anonymous.
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             if ($cat[0] === $categoryName) {
148 148
                 return $cat;
149 149
             }
150
-         }
150
+            }
151 151
 
152 152
         // not found
153 153
         return false;
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
     public function getCategoryNameById(string $categoryId)
165 165
     {
166 166
         foreach ($this->aipdbApiCategories as $cat){
167
-           if ($cat[1] === $categoryId) {
168
-               return $cat;
169
-           }
167
+            if ($cat[1] === $categoryId) {
168
+                return $cat;
169
+            }
170 170
         }
171 171
 
172 172
         // not found
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                 return $i;
191 191
             }
192 192
             $i++;
193
-         }
193
+            }
194 194
 
195 195
         // not found
196 196
         return false;
Please login to merge, or discard this patch.