@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function report(string $ip = '', string $categories = '', string $message = '', bool $returnArray = false) |
| 158 | 158 | { |
| 159 | - // ip must be set |
|
| 159 | + // ip must be set |
|
| 160 | 160 | if (empty($ip)){ |
| 161 | 161 | throw new \InvalidArgumentException('Ip was empty'); |
| 162 | 162 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | // message must be set |
| 170 | - if (empty($message)){ |
|
| 170 | + if (empty($message)){ |
|
| 171 | 171 | throw new \InvalidArgumentException('report message was empty'); |
| 172 | 172 | } |
| 173 | 173 | |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | |
| 281 | 281 | // option |
| 282 | 282 | if ($verbose){ |
| 283 | - $data['verbose'] = true; |
|
| 283 | + $data['verbose'] = true; |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | // check AbuseIPDB request |
@@ -367,14 +367,14 @@ discard block |
||
| 367 | 367 | 'Key: ' . $this->aipdbApiKey, |
| 368 | 368 | ]); |
| 369 | 369 | |
| 370 | - // execute curl call |
|
| 371 | - $result = curl_exec($ch); |
|
| 370 | + // execute curl call |
|
| 371 | + $result = curl_exec($ch); |
|
| 372 | 372 | |
| 373 | - // close connection |
|
| 374 | - curl_close($ch); |
|
| 373 | + // close connection |
|
| 374 | + curl_close($ch); |
|
| 375 | 375 | |
| 376 | - // return response as JSON data |
|
| 377 | - return $result; |
|
| 376 | + // return response as JSON data |
|
| 377 | + return $result; |
|
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | /** |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * @access public |
| 386 | 386 | * @param string $message The original message |
| 387 | 387 | * |
| 388 | - * @return string |
|
| 388 | + * @return string |
|
| 389 | 389 | */ |
| 390 | 390 | protected function cleanMessage(string $message) |
| 391 | 391 | { |
@@ -410,10 +410,10 @@ discard block |
||
| 410 | 410 | * |
| 411 | 411 | * @access public |
| 412 | 412 | * @static |
| 413 | - * @param string $filePath The file's full path |
|
| 414 | - * @param bool $trowError Throw error on true or silent process. Default is true |
|
| 413 | + * @param string $filePath The file's full path |
|
| 414 | + * @param bool $trowError Throw error on true or silent process. Default is true |
|
| 415 | 415 | * |
| 416 | - * @return object|null |
|
| 416 | + * @return object|null |
|
| 417 | 417 | * @throws \Exception |
| 418 | 418 | * @throws \LogicException |
| 419 | 419 | */ |
@@ -421,10 +421,10 @@ discard block |
||
| 421 | 421 | { |
| 422 | 422 | // check file exists |
| 423 | 423 | if (!file_exists($filePath) || !is_file($filePath)){ |
| 424 | - if ($throwError) { |
|
| 424 | + if ($throwError) { |
|
| 425 | 425 | throw new \Exception('Config file not found'); |
| 426 | - } |
|
| 427 | - return null; |
|
| 426 | + } |
|
| 427 | + return null; |
|
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | // get and parse content |
@@ -70,8 +70,8 @@ discard block |
||
| 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. |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | // Abuse was targeted at an "Internet of Things" type device. Include |
| 121 | 121 | // information about what type of device was targeted in the comments. |
| 122 | 122 | ['oit' , '23', 'IoT Targeted', true], |
| 123 | - ]; |
|
| 123 | + ]; |
|
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | 126 | * Get the category id corresponding to given name |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | if ($cat[0] === $categoryName) { |
| 137 | 137 | return $cat; |
| 138 | 138 | } |
| 139 | - } |
|
| 139 | + } |
|
| 140 | 140 | |
| 141 | 141 | // not found |
| 142 | 142 | return false; |
@@ -153,9 +153,9 @@ discard block |
||
| 153 | 153 | public function getCategoryNameById(string $categoryId) |
| 154 | 154 | { |
| 155 | 155 | foreach ($this->aipdbApiCategories as $cat){ |
| 156 | - if ($cat[1] === $categoryId) { |
|
| 157 | - return $cat; |
|
| 158 | - } |
|
| 156 | + if ($cat[1] === $categoryId) { |
|
| 157 | + return $cat; |
|
| 158 | + } |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | // not found |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | return $i; |
| 180 | 180 | } |
| 181 | 181 | $i++; |
| 182 | - } |
|
| 182 | + } |
|
| 183 | 183 | |
| 184 | 184 | // not found |
| 185 | 185 | return false; |