Passed
Push — master ( ed9e4b...1a882c )
by Kris
01:40
created
lib/ApiHandler.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function report(string $ip = '', string $categories = '', string $message = '', bool $returnArray = false)
147 147
     {
148
-         // ip must be set
148
+            // ip must be set
149 149
         if (empty($ip)){
150 150
             throw new \InvalidArgumentException('Ip was empty');
151 151
         }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         }
157 157
 
158 158
         // message must be set
159
-          if (empty($message)){
159
+            if (empty($message)){
160 160
             throw new \InvalidArgumentException('report message was empty');
161 161
         }
162 162
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
         // option
313 313
         if ($verbose){
314
-           $data['verbose'] = true;
314
+            $data['verbose'] = true;
315 315
         }
316 316
 
317 317
         $response = $this->apiRequest('check', $data, 'GET', $returnArray) ;
@@ -457,14 +457,14 @@  discard block
 block discarded – undo
457 457
             'Key: ' . $this->aipdbApiKey,
458 458
         ]);
459 459
   
460
-      // execute curl call
461
-      $result = curl_exec($ch);
460
+        // execute curl call
461
+        $result = curl_exec($ch);
462 462
   
463
-      // close connection
464
-      curl_close($ch);
463
+        // close connection
464
+        curl_close($ch);
465 465
   
466
-      // return response as JSON data
467
-      return $result;
466
+        // return response as JSON data
467
+        return $result;
468 468
     }
469 469
 
470 470
     /** 
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
      * @access public
476 476
      * @param string      $message           The original message 
477 477
      *  
478
-	 * @return string
478
+     * @return string
479 479
      */
480 480
     protected function cleanMessage(string $message)
481 481
     {
@@ -500,10 +500,10 @@  discard block
 block discarded – undo
500 500
      *
501 501
      * @access public
502 502
      * @static
503
-	 * @param string    $filePath       The file's full path
504
-	 * @param bool      $throwError     Throw error on true or silent process. Default is true
503
+     * @param string    $filePath       The file's full path
504
+     * @param bool      $throwError     Throw error on true or silent process. Default is true
505 505
      *  
506
-	 * @return object|null 
506
+     * @return object|null 
507 507
      * @throws \Exception
508 508
      * @throws \LogicException
509 509
      */
@@ -511,10 +511,10 @@  discard block
 block discarded – undo
511 511
     {
512 512
         // check file exists
513 513
         if (!file_exists($filePath) || !is_file($filePath)){
514
-           if ($throwError) {
514
+            if ($throwError) {
515 515
                 throw new \Exception('Config file not found');
516
-           }
517
-           return null;  
516
+            }
517
+            return null;  
518 518
         }
519 519
 
520 520
         // get and parse content
Please login to merge, or discard this patch.