@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function findBy($key, $value) |
| 129 | 129 | { |
| 130 | - return collect($this->items)->filter(function ($item) use ($key, $value) { |
|
| 130 | + return collect($this->items)->filter(function($item) use ($key, $value) { |
|
| 131 | 131 | return $item->{$key} == $value; |
| 132 | 132 | })->first(); |
| 133 | 133 | } |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | preg_match_all('/{[\s]*?([^\s]+)[\s]*?}/i', $key, $matches, PREG_SET_ORDER); |
| 297 | 297 | foreach ($matches as $match) { |
| 298 | 298 | if (array_key_exists($match[1], $this->bindings)) { |
| 299 | - $key = preg_replace('/' . $match[0] . '/', $this->bindings[$match[1]], $key, 1); |
|
| 299 | + $key = preg_replace('/'.$match[0].'/', $this->bindings[$match[1]], $key, 1); |
|
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | } |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | */ |
| 313 | 313 | protected function resolveItems(array &$items) |
| 314 | 314 | { |
| 315 | - $resolver = function ($property) { |
|
| 315 | + $resolver = function($property) { |
|
| 316 | 316 | return $this->resolve($property) ?: $property; |
| 317 | 317 | }; |
| 318 | 318 | |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | */ |
| 412 | 412 | protected function formatUrl($url) |
| 413 | 413 | { |
| 414 | - $uri = !is_null($this->prefixUrl) ? $this->prefixUrl . $url : $url; |
|
| 414 | + $uri = !is_null($this->prefixUrl) ? $this->prefixUrl.$url : $url; |
|
| 415 | 415 | |
| 416 | 416 | return $uri == '/' ? '/' : ltrim(rtrim($uri, '/'), '/'); |
| 417 | 417 | } |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | public function getOrderedItems() |
| 629 | 629 | { |
| 630 | 630 | if (config('menus.ordering') || $this->ordering) { |
| 631 | - return $this->toCollection()->sortBy(function ($item) { |
|
| 631 | + return $this->toCollection()->sortBy(function($item) { |
|
| 632 | 632 | return $item->order; |
| 633 | 633 | })->all(); |
| 634 | 634 | } |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $presenter = $this->getPresenter(); |
| 647 | 647 | $menu = $presenter->getOpenTagWrapper(); |
| 648 | 648 | |
| 649 | - $items = array_filter($this->getOrderedItems(), function ($item) { |
|
| 649 | + $items = array_filter($this->getOrderedItems(), function($item) { |
|
| 650 | 650 | return !$item->hidden(); |
| 651 | 651 | }); |
| 652 | 652 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | if ($this->hasBadge()) { |
| 277 | 277 | extract($this->badge); |
| 278 | 278 | |
| 279 | - return '<span class="' . $type . '">' . $text . '</span>'; |
|
| 279 | + return '<span class="'.$type.'">'.$text.'</span>'; |
|
| 280 | 280 | } |
| 281 | 281 | return ''; |
| 282 | 282 | } |
@@ -291,13 +291,13 @@ discard block |
||
| 291 | 291 | public function getIcon(string $default = null): ?string |
| 292 | 292 | { |
| 293 | 293 | if ($this->icon !== null && $this->icon !== '') { |
| 294 | - return '<i class="' . $this->icon . '"></i>'; |
|
| 294 | + return '<i class="'.$this->icon.'"></i>'; |
|
| 295 | 295 | } |
| 296 | 296 | if ($default === null) { |
| 297 | 297 | return $default; |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | - return '<i class="' . $default . '"></i>'; |
|
| 300 | + return '<i class="'.$default.'"></i>'; |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /** |
@@ -322,17 +322,17 @@ discard block |
||
| 322 | 322 | Arr::forget($attributes, ['active', 'icon']); |
| 323 | 323 | |
| 324 | 324 | $attributeString = collect($attributes) |
| 325 | - ->map(function ($value, $key) { |
|
| 325 | + ->map(function($value, $key) { |
|
| 326 | 326 | if (is_bool($value)) { |
| 327 | 327 | return $value ? $key : ''; |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - return $key . '="' . e($value) . '"'; |
|
| 330 | + return $key.'="'.e($value).'"'; |
|
| 331 | 331 | }) |
| 332 | 332 | ->filter() |
| 333 | 333 | ->implode(' '); |
| 334 | 334 | |
| 335 | - return $attributeString ? ' ' . $attributeString : ''; |
|
| 335 | + return $attributeString ? ' '.$attributeString : ''; |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /** |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | $inactive = $this->getInactiveAttribute(); |
| 445 | 445 | |
| 446 | 446 | if ($inactive === '1' || $inactive === '0') { |
| 447 | - return (bool)$inactive; |
|
| 447 | + return (bool) $inactive; |
|
| 448 | 448 | } |
| 449 | 449 | if (is_bool($inactive)) { |
| 450 | 450 | return $inactive; |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | $active = $this->getActiveAttribute(); |
| 492 | 492 | |
| 493 | 493 | if ($active === '1' || $active === '0') { |
| 494 | - return (bool)$active; |
|
| 494 | + return (bool) $active; |
|
| 495 | 495 | } |
| 496 | 496 | if (is_bool($active)) { |
| 497 | 497 | return $active; |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | */ |
| 526 | 526 | protected function getActiveStateFromRoute(): bool |
| 527 | 527 | { |
| 528 | - return Request::is(str_replace(url('/') . '/', '', $this->getUrl())); |
|
| 528 | + return Request::is(str_replace(url('/').'/', '', $this->getUrl())); |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | /** |