@@ -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 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $parsed = parse_url($this->url); |
92 | 92 | $paths = $this->renewArray(explode('/', parse_url($this->url, PHP_URL_PATH))); |
93 | 93 | |
94 | - $this->baseUrl = $parsed['scheme'] . '://' . $parsed['host']; |
|
94 | + $this->baseUrl = $parsed['scheme'].'://'.$parsed['host']; |
|
95 | 95 | $this->category = ''; |
96 | 96 | $this->board = $paths[2]; |
97 | 97 | $this->thread = $paths[3]; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $lines = array_filter(explode("\n", $body), 'strlen'); |
110 | 110 | $number = 0; |
111 | 111 | |
112 | - return collect(array_map(function ($line) use (&$number) { |
|
112 | + return collect(array_map(function($line) use (&$number) { |
|
113 | 113 | $number++; |
114 | 114 | list($name, $email, $date, $body) = explode('<>', $line); |
115 | 115 | $name = trim(strip_tags($name)); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | { |
133 | 133 | $threads = array_filter(explode("\n", $body), 'strlen'); |
134 | 134 | |
135 | - return collect(array_map(function ($elem) { |
|
135 | + return collect(array_map(function($elem) { |
|
136 | 136 | list($id, $tmp) = explode('.dat<>', $elem); |
137 | 137 | preg_match('/^(.*)\(([0-9]+)\)\z/', $tmp, $matches); |
138 | 138 |