@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * @param string $email |
| 55 | 55 | * @param null $text |
| 56 | 56 | * |
| 57 | - * @return mixed|string |
|
| 57 | + * @return string |
|
| 58 | 58 | * @throws MonarException |
| 59 | 59 | * @throws \GuzzleHttp\Exception\GuzzleException |
| 60 | 60 | */ |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | /** |
| 130 | 130 | * parse threads collection. |
| 131 | 131 | * |
| 132 | - * @param $body |
|
| 132 | + * @param string $body |
|
| 133 | 133 | * |
| 134 | 134 | * @return \Illuminate\Support\Collection |
| 135 | 135 | */ |
@@ -160,6 +160,7 @@ discard block |
||
| 160 | 160 | * |
| 161 | 161 | * @param int $start |
| 162 | 162 | * @param int| null $end |
| 163 | + * @param integer $end |
|
| 163 | 164 | * |
| 164 | 165 | * @return string |
| 165 | 166 | */ |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | { |
| 118 | 118 | $lines = array_filter(explode("\n", $body), '\strlen'); |
| 119 | 119 | |
| 120 | - return collect(array_map(function ($line) { |
|
| 121 | - [$number, $name, $email, $date, $body, , $resid] = explode('<>', $line); |
|
| 120 | + return collect(array_map(function($line) { |
|
| 121 | + [$number, $name, $email, $date, $body,, $resid] = explode('<>', $line); |
|
| 122 | 122 | $name = trim(strip_tags($name)); |
| 123 | 123 | $body = strip_tags($body, '<br>'); |
| 124 | 124 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | { |
| 138 | 138 | $threads = array_filter(explode("\n", $body), '\strlen'); |
| 139 | 139 | |
| 140 | - return collect(array_map(function ($elem) { |
|
| 140 | + return collect(array_map(function($elem) { |
|
| 141 | 141 | [$id, $tmp] = explode('.cgi,', $elem); |
| 142 | 142 | preg_match('/^(.*)\((\d+)\)\z/', $tmp, $matches); |
| 143 | 143 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @param string $email |
| 53 | 53 | * @param null $text |
| 54 | 54 | * |
| 55 | - * @return mixed|string |
|
| 55 | + * @return string |
|
| 56 | 56 | * @throws MonarException |
| 57 | 57 | * @throws \GuzzleHttp\Exception\GuzzleException |
| 58 | 58 | */ |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * parse threads collection. |
| 143 | 143 | * |
| 144 | - * @param $body |
|
| 144 | + * @param string $body |
|
| 145 | 145 | * |
| 146 | 146 | * @return \Illuminate\Support\Collection |
| 147 | 147 | */ |
@@ -171,6 +171,7 @@ discard block |
||
| 171 | 171 | * |
| 172 | 172 | * @param int $start |
| 173 | 173 | * @param int| null $end |
| 174 | + * @param integer $end |
|
| 174 | 175 | * |
| 175 | 176 | * @return string |
| 176 | 177 | */ |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $lines = array_filter(explode("\n", $body), '\strlen'); |
| 127 | 127 | $number = 0; |
| 128 | 128 | |
| 129 | - return collect(array_map(function ($line) use (&$number) { |
|
| 129 | + return collect(array_map(function($line) use (&$number) { |
|
| 130 | 130 | $number++; |
| 131 | 131 | [$name, $email, $date, $body] = explode('<>', $line); |
| 132 | 132 | $name = trim(strip_tags($name)); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | { |
| 150 | 150 | $threads = array_filter(explode("\n", $body), '\strlen'); |
| 151 | 151 | |
| 152 | - return collect(array_map(function ($elem) { |
|
| 152 | + return collect(array_map(function($elem) { |
|
| 153 | 153 | [$id, $tmp] = explode('.dat<>', $elem); |
| 154 | 154 | preg_match('/^(.*)\((\d+)\)\z/', $tmp, $matches); |
| 155 | 155 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | $error = $response->getHeader('ERROR'); |
| 94 | 94 | |
| 95 | - if (! empty($error)) { |
|
| 95 | + if (!empty($error)) { |
|
| 96 | 96 | $errorStr = \is_array($error) ? implode(',', $error) : $error; |
| 97 | 97 | throw new MonarException("url: {$url}. method: {$method}. error:{$errorStr}"); |
| 98 | 98 | } |
@@ -165,5 +165,5 @@ discard block |
||
| 165 | 165 | * |
| 166 | 166 | * @return string |
| 167 | 167 | */ |
| 168 | - abstract protected function postUrl(): string ; |
|
| 168 | + abstract protected function postUrl(): string; |
|
| 169 | 169 | } |