@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | $line = Console::text(' →', $defaultColor); |
| 173 | 173 | $line .= self::printResult(' reported at: ', self::getDate($report->reportedAt), $defaultColor, '', false); |
| 174 | - // $line .= self::printResult(' by user: ', $report->reporterId, $defaultColor, '', false); |
|
| 174 | + // $line .= self::printResult(' by user: ', $report->reporterId, $defaultColor, '', false); |
|
| 175 | 175 | if (isset($report->reporterCountryCode) && isset($report->reporterCountryName)){ |
| 176 | 176 | $line .= Console::text(' from: ', 'white'); |
| 177 | 177 | $line .= self::printResult('', $report->reporterCountryCode, $defaultColor, '', false); |
@@ -206,5 +206,5 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | return $categories; |
| 209 | - } |
|
| 209 | + } |
|
| 210 | 210 | } |
| 211 | 211 | \ No newline at end of file |
@@ -171,7 +171,7 @@ |
||
| 171 | 171 | */ |
| 172 | 172 | protected static function getNumericParameter(array $arguments, string $shortArg, string $longArg, int $defaultValue): int |
| 173 | 173 | { |
| 174 | - if (self::inArguments($arguments,$shortArg, $longArg)){ |
|
| 174 | + if (self::inArguments($arguments,$shortArg, $longArg)){ |
|
| 175 | 175 | $val = self::getArgumentValue($arguments,$shortArg, $longArg); |
| 176 | 176 | |
| 177 | 177 | if (!is_numeric($val)){ |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | protected static function inArguments(array $arguments, string $shortArg, string $longArg): bool |
| 92 | 92 | { |
| 93 | - return array_key_exists($shortArg, $arguments) || array_key_exists($longArg, $arguments); |
|
| 93 | + return array_key_exists($shortArg, $arguments) || array_key_exists($longArg, $arguments); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @param string $filePath The file's full path |
| 102 | 102 | * @param bool $throwError Throw error on true or silent process. Default is true |
| 103 | 103 | * |
| 104 | - * @return object|null |
|
| 104 | + * @return object|null |
|
| 105 | 105 | * @throws \Exception |
| 106 | 106 | * @throws \LogicException |
| 107 | 107 | */ |
@@ -109,10 +109,10 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | // check file exists |
| 111 | 111 | if (!file_exists($filePath) || !is_file($filePath)){ |
| 112 | - if ($throwError) { |
|
| 112 | + if ($throwError) { |
|
| 113 | 113 | throw new \Exception('Config file not found'); |
| 114 | - } |
|
| 115 | - return null; |
|
| 114 | + } |
|
| 115 | + return null; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | // get and parse content |
@@ -104,54 +104,54 @@ |
||
| 104 | 104 | |
| 105 | 105 | Console::log(' ' . Console::text('SYNOPSIS:', 'white', 'underline')); |
| 106 | 106 | Console::log(' ' . Console::text(' abuseipdb -C ') . |
| 107 | - Console::text('IP', 'yellow') . |
|
| 108 | - Console::text(' [-d ') . |
|
| 109 | - Console::text('DAYS', 'yellow') . |
|
| 110 | - Console::text('] [-v] [-l ') . |
|
| 111 | - Console::text('LIMIT', 'yellow') . |
|
| 112 | - Console::text('] [-o ') . |
|
| 113 | - Console::text('FORMAT', 'yellow') . |
|
| 114 | - Console::text(']')); |
|
| 107 | + Console::text('IP', 'yellow') . |
|
| 108 | + Console::text(' [-d ') . |
|
| 109 | + Console::text('DAYS', 'yellow') . |
|
| 110 | + Console::text('] [-v] [-l ') . |
|
| 111 | + Console::text('LIMIT', 'yellow') . |
|
| 112 | + Console::text('] [-o ') . |
|
| 113 | + Console::text('FORMAT', 'yellow') . |
|
| 114 | + Console::text(']')); |
|
| 115 | 115 | |
| 116 | 116 | Console::log(' ' . Console::text(' abuseipdb -K ') . |
| 117 | - Console::text('NETWORK', 'yellow') . |
|
| 118 | - Console::text(' [-d ') . |
|
| 119 | - Console::text('DAYS', 'yellow') . |
|
| 120 | - Console::text('] [-o ') . |
|
| 121 | - Console::text('FORMAT', 'yellow') . |
|
| 122 | - Console::text(']')); |
|
| 117 | + Console::text('NETWORK', 'yellow') . |
|
| 118 | + Console::text(' [-d ') . |
|
| 119 | + Console::text('DAYS', 'yellow') . |
|
| 120 | + Console::text('] [-o ') . |
|
| 121 | + Console::text('FORMAT', 'yellow') . |
|
| 122 | + Console::text(']')); |
|
| 123 | 123 | |
| 124 | 124 | Console::log(' ' . Console::text(' abuseipdb -R ') . |
| 125 | - Console::text('IP', 'yellow') . ' -c ' . |
|
| 126 | - Console::text('CATEGORIES', 'yellow') . ' -m ' . |
|
| 127 | - Console::text('MESSAGE', 'yellow') . |
|
| 128 | - Console::text(' [-o ') . |
|
| 129 | - Console::text('FORMAT', 'yellow') . |
|
| 130 | - Console::text(']')); |
|
| 125 | + Console::text('IP', 'yellow') . ' -c ' . |
|
| 126 | + Console::text('CATEGORIES', 'yellow') . ' -m ' . |
|
| 127 | + Console::text('MESSAGE', 'yellow') . |
|
| 128 | + Console::text(' [-o ') . |
|
| 129 | + Console::text('FORMAT', 'yellow') . |
|
| 130 | + Console::text(']')); |
|
| 131 | 131 | |
| 132 | 132 | Console::log(' ' . Console::text(' abuseipdb -V ') . |
| 133 | - Console::text('FILE', 'yellow') . |
|
| 134 | - Console::text(' [-o ') . |
|
| 135 | - Console::text('FORMAT', 'yellow') . |
|
| 136 | - Console::text(']')); |
|
| 133 | + Console::text('FILE', 'yellow') . |
|
| 134 | + Console::text(' [-o ') . |
|
| 135 | + Console::text('FORMAT', 'yellow') . |
|
| 136 | + Console::text(']')); |
|
| 137 | 137 | |
| 138 | 138 | Console::log(' ' . Console::text(' abuseipdb -E ') . |
| 139 | - Console::text('IP', 'yellow'). |
|
| 140 | - Console::text(' [-o ') . |
|
| 141 | - Console::text('FORMAT', 'yellow') . |
|
| 142 | - Console::text(']')); |
|
| 139 | + Console::text('IP', 'yellow'). |
|
| 140 | + Console::text(' [-o ') . |
|
| 141 | + Console::text('FORMAT', 'yellow') . |
|
| 142 | + Console::text(']')); |
|
| 143 | 143 | |
| 144 | 144 | Console::log(' ' . Console::text(' abuseipdb -B ') . |
| 145 | - Console::text('[-l ') . |
|
| 146 | - Console::text('LIMIT', 'yellow') . |
|
| 147 | - Console::text('] [-s ') . |
|
| 148 | - Console::text('SCORE', 'yellow') . |
|
| 149 | - Console::text('] [-o ') . |
|
| 150 | - Console::text('FORMAT', 'yellow') . |
|
| 151 | - Console::text(']')); |
|
| 145 | + Console::text('[-l ') . |
|
| 146 | + Console::text('LIMIT', 'yellow') . |
|
| 147 | + Console::text('] [-s ') . |
|
| 148 | + Console::text('SCORE', 'yellow') . |
|
| 149 | + Console::text('] [-o ') . |
|
| 150 | + Console::text('FORMAT', 'yellow') . |
|
| 151 | + Console::text(']')); |
|
| 152 | 152 | |
| 153 | 153 | Console::log(' ' . Console::text(' abuseipdb -S ' . |
| 154 | - Console::text('KEY', 'yellow'))); |
|
| 154 | + Console::text('KEY', 'yellow'))); |
|
| 155 | 155 | |
| 156 | 156 | Console::log(' ' . Console::text(' abuseipdb -L | -G | -h | --version')); |
| 157 | 157 | |