@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | public function register() |
10 | 10 | { |
11 | - $this->app->bind(Factory::class, function () { |
|
11 | + $this->app->bind(Factory::class, function() { |
|
12 | 12 | return new MonarManager($this->app); |
13 | 13 | }); |
14 | 14 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $response = $this->client->request($method, $url, $options); |
88 | 88 | |
89 | 89 | $error = $response->getHeader('ERROR'); |
90 | - if (! empty($error)) { |
|
90 | + if (!empty($error)) { |
|
91 | 91 | $errorStr = is_array($error) ? implode(',', $error) : $error; |
92 | 92 | throw new MonarException("url: {$url}. method: {$method}. error:{$errorStr}"); |
93 | 93 | } |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | { |
115 | 115 | $lines = array_filter(explode("\n", $body), 'strlen'); |
116 | 116 | |
117 | - return collect(array_map(function ($line) { |
|
118 | - list($number, $name, $email, $date, $body, , $resid) = explode('<>', $line); |
|
117 | + return collect(array_map(function($line) { |
|
118 | + list($number, $name, $email, $date, $body,, $resid) = explode('<>', $line); |
|
119 | 119 | $name = trim(strip_tags($name)); |
120 | 120 | $body = strip_tags($body, '<br>'); |
121 | 121 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | $threads = array_filter(explode("\n", $body), 'strlen'); |
136 | 136 | |
137 | - return collect(array_map(function ($elem) { |
|
137 | + return collect(array_map(function($elem) { |
|
138 | 138 | list($id, $tmp) = explode('.cgi,', $elem); |
139 | 139 | preg_match('/^(.*)\(([0-9]+)\)\z/', $tmp, $matches); |
140 | 140 | |
@@ -157,13 +157,13 @@ discard block |
||
157 | 157 | protected function messagesUrl($start = 1, $end = null) |
158 | 158 | { |
159 | 159 | $url = "{$this->baseUrl}/bbs/rawmode.cgi/{$this->category}/{$this->board}/{$this->thread}/"; |
160 | - if (! is_null($start) && ! is_null($end)) { |
|
160 | + if (!is_null($start) && !is_null($end)) { |
|
161 | 161 | return $url."{$start}-{$end}"; |
162 | 162 | } |
163 | - if (! is_null($start) && is_null($end)) { |
|
163 | + if (!is_null($start) && is_null($end)) { |
|
164 | 164 | return $url."{$start}-"; |
165 | 165 | } |
166 | - if (is_null($start) && ! is_null($end)) { |
|
166 | + if (is_null($start) && !is_null($end)) { |
|
167 | 167 | return $url."-{$end}"; |
168 | 168 | } |
169 | 169 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $lines = array_filter(explode("\n", $body), 'strlen'); |
109 | 109 | $number = 0; |
110 | 110 | |
111 | - return collect(array_map(function ($line) use (&$number) { |
|
111 | + return collect(array_map(function($line) use (&$number) { |
|
112 | 112 | $number++; |
113 | 113 | list($name, $email, $date, $body) = explode('<>', $line); |
114 | 114 | $name = trim(strip_tags($name)); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | $threads = array_filter(explode("\n", $body), 'strlen'); |
133 | 133 | |
134 | - return collect(array_map(function ($elem) { |
|
134 | + return collect(array_map(function($elem) { |
|
135 | 135 | list($id, $tmp) = explode('.dat<>', $elem); |
136 | 136 | preg_match('/^(.*)\(([0-9]+)\)\z/', $tmp, $matches); |
137 | 137 |