@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | { |
214 | 214 | $model = $this->createModel(); |
215 | 215 | |
216 | - $query = $model->newQuery()->where('decomposed', 'like', $this->decomposer->execute($string) . '%') |
|
216 | + $query = $model->newQuery()->where('decomposed', 'like', $this->decomposer->execute($string).'%') |
|
217 | 217 | ->orderBy('count', 'desc') |
218 | 218 | ->take($take); |
219 | 219 | |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function setModel($model) |
269 | 269 | { |
270 | - $this->model = '\\' . ltrim($model, '\\'); |
|
270 | + $this->model = '\\'.ltrim($model, '\\'); |
|
271 | 271 | |
272 | 272 | return $this; |
273 | 273 | } |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function execute($string) |
52 | 52 | { |
53 | - $cho = ["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ", |
|
54 | - "ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"]; |
|
55 | - $jung = ["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ", |
|
56 | - "ㅚ","ㅛ","ㅜ","ㅝ","ㅞ","ㅟ","ㅠ","ㅡ","ㅢ","ㅣ"]; |
|
57 | - $jong = ["","ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ", |
|
58 | - "ㄿ","ㅀ","ㅁ","ㅂ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ"," ㅌ","ㅍ","ㅎ"]; |
|
53 | + $cho = ["ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", |
|
54 | + "ㅆ", "ㅇ", "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"]; |
|
55 | + $jung = ["ㅏ", "ㅐ", "ㅑ", "ㅒ", "ㅓ", "ㅔ", "ㅕ", "ㅖ", "ㅗ", "ㅘ", "ㅙ", |
|
56 | + "ㅚ", "ㅛ", "ㅜ", "ㅝ", "ㅞ", "ㅟ", "ㅠ", "ㅡ", "ㅢ", "ㅣ"]; |
|
57 | + $jong = ["", "ㄱ", "ㄲ", "ㄳ", "ㄴ", "ㄵ", "ㄶ", "ㄷ", "ㄹ", "ㄺ", "ㄻ", "ㄼ", "ㄽ", "ㄾ", |
|
58 | + "ㄿ", "ㅀ", "ㅁ", "ㅂ", "ㅄ", "ㅅ", "ㅆ", "ㅇ", "ㅈ", "ㅊ", "ㅋ", " ㅌ", "ㅍ", "ㅎ"]; |
|
59 | 59 | |
60 | 60 | $result = ""; |
61 | 61 | for ($i = 0; $i < $this->strlen($string); $i++) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $choIdx = $code / 588; |
66 | 66 | $jungIdx = $code % 588 / 28; |
67 | 67 | $jongIdx = $code % 28; |
68 | - $result .= $cho[$choIdx] . $jung[$jungIdx] . $jong[$jongIdx]; |
|
68 | + $result .= $cho[$choIdx].$jung[$jungIdx].$jong[$jongIdx]; |
|
69 | 69 | } else { |
70 | 70 | $result .= $char; |
71 | 71 | } |
@@ -119,13 +119,13 @@ discard block |
||
119 | 119 | if ($h < 0xC2) { |
120 | 120 | return null; |
121 | 121 | } |
122 | - if ($h <= 0xDF && $len>1) { |
|
123 | - return ($h & 0x1F) << 6 | (ord($ch{1}) & 0x3F); |
|
122 | + if ($h <= 0xDF && $len > 1) { |
|
123 | + return ($h & 0x1F) << 6 | (ord($ch{1}) & 0x3F); |
|
124 | 124 | } |
125 | - if ($h <= 0xEF && $len>2) { |
|
125 | + if ($h <= 0xEF && $len > 2) { |
|
126 | 126 | return ($h & 0x0F) << 12 | (ord($ch{1}) & 0x3F) << 6 | (ord($ch{2}) & 0x3F); |
127 | 127 | } |
128 | - if ($h <= 0xF4 && $len>3) { |
|
128 | + if ($h <= 0xF4 && $len > 3) { |
|
129 | 129 | return ($h & 0x0F) << 18 | (ord($ch{1}) & 0x3F) << 12 | (ord($ch{2}) & 0x3F) << 6 | (ord($ch{3}) & 0x3F); |
130 | 130 | } |
131 | 131 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | $this->getSkinPath($view), |
90 | 90 | $this->data, |
91 | 91 | [ |
92 | - '_skin' => function ($path) { |
|
92 | + '_skin' => function($path) { |
|
93 | 93 | return $this->getSkinPath($path); |
94 | 94 | }, |
95 | 95 | '_config' => $this->config |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function getMobileResolver() |
239 | 239 | { |
240 | - return $this->mobileResolver ?: function () { |
|
240 | + return $this->mobileResolver ?: function() { |
|
241 | 241 | }; |
242 | 242 | } |
243 | 243 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $skins = $this->getList($target, $isSettings); |
300 | 300 | return array_where( |
301 | 301 | $skins, |
302 | - function ($id, $entity) { |
|
302 | + function($id, $entity) { |
|
303 | 303 | /** @var SkinEntity $entity */ |
304 | 304 | return $entity->supportMobile(); |
305 | 305 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $skins = $this->getList($target, $isSettings); |
320 | 320 | return array_where( |
321 | 321 | $skins, |
322 | - function ($id, $entity) { |
|
322 | + function($id, $entity) { |
|
323 | 323 | /** @var SkinEntity $entity */ |
324 | 324 | return $entity->supportDesktop(); |
325 | 325 | } |
@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | public static function setItemModel($model) |
106 | 106 | { |
107 | - static::$itemModel = '\\' . ltrim($model, '\\'); |
|
107 | + static::$itemModel = '\\'.ltrim($model, '\\'); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function getMobileResolver() |
239 | 239 | { |
240 | - return $this->mobileResolver ?: function () { |
|
240 | + return $this->mobileResolver ?: function() { |
|
241 | 241 | }; |
242 | 242 | } |
243 | 243 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $skins = $this->getList($target, $isSettings); |
300 | 300 | return array_where( |
301 | 301 | $skins, |
302 | - function ($id, $entity) { |
|
302 | + function($id, $entity) { |
|
303 | 303 | /** @var SkinEntity $entity */ |
304 | 304 | return $entity->supportMobile(); |
305 | 305 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $skins = $this->getList($target, $isSettings); |
320 | 320 | return array_where( |
321 | 321 | $skins, |
322 | - function ($id, $entity) { |
|
322 | + function($id, $entity) { |
|
323 | 323 | /** @var SkinEntity $entity */ |
324 | 324 | return $entity->supportDesktop(); |
325 | 325 | } |
@@ -333,6 +333,6 @@ |
||
333 | 333 | */ |
334 | 334 | public function setModel($model) |
335 | 335 | { |
336 | - $this->model = '\\' . ltrim($model, '\\'); |
|
336 | + $this->model = '\\'.ltrim($model, '\\'); |
|
337 | 337 | } |
338 | 338 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | if (!str_contains($email, '@')) { |
58 | 58 | $emailPrefix = $email; |
59 | 59 | |
60 | - $query = $query->whereHas('emails', function ($q) use ($emailPrefix) { |
|
60 | + $query = $query->whereHas('emails', function($q) use ($emailPrefix) { |
|
61 | 61 | $q->where('address', 'like', $emailPrefix.'@%'); |
62 | 62 | })->get(); |
63 | 63 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | return null; |
68 | 68 | } |
69 | 69 | } else { |
70 | - $user = $query->whereHas('emails', function ($q) use ($email) { |
|
70 | + $user = $query->whereHas('emails', function($q) use ($email) { |
|
71 | 71 | $q->where('address', $email); |
72 | 72 | })->first(); |
73 | 73 | } |
@@ -353,7 +353,7 @@ |
||
353 | 353 | |
354 | 354 | protected function inputFilterParser($prefix, $inputs = []) |
355 | 355 | { |
356 | - $inputs = array_where($inputs, function ($key, $value) use ($prefix) { |
|
356 | + $inputs = array_where($inputs, function($key, $value) use ($prefix) { |
|
357 | 357 | return starts_with($key, $prefix); |
358 | 358 | }); |
359 | 359 |