@@ -23,15 +23,15 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | foreach ($rules as $key => $rule) { |
| 26 | - $translationrules['trans.' . $locale . '.' . $key] = $rule; |
|
| 26 | + $translationrules['trans.'.$locale.'.'.$key] = $rule; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | foreach ($attributes as $key => $attribute) { |
| 30 | - $translationattributes['trans.' . $locale . '.' . $key] = $attribute; |
|
| 30 | + $translationattributes['trans.'.$locale.'.'.$key] = $attribute; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | foreach ($messages as $key => $message) { |
| 34 | - $translationmessages['trans.' . $locale . '.' . $key] = $message; |
|
| 34 | + $translationmessages['trans.'.$locale.'.'.$key] = $message; |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $collection = NodeCollection::fromArray($items); |
| 27 | 27 | |
| 28 | - $collection->mapRecursive(function ($node) { |
|
| 28 | + $collection->mapRecursive(function($node) { |
|
| 29 | 29 | return $node->replaceEntry((new MenuItem())->entry($node)); |
| 30 | 30 | }); |
| 31 | 31 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function items(): NodeCollection |
| 43 | 43 | { |
| 44 | 44 | if (!$this->includeHidden) { |
| 45 | - $this->collection = $this->collection->shake(function ($node) { |
|
| 45 | + $this->collection = $this->collection->shake(function($node) { |
|
| 46 | 46 | return !$node->hidden_in_menu && !$node->draft; |
| 47 | 47 | }); |
| 48 | 48 | } |
@@ -55,22 +55,22 @@ discard block |
||
| 55 | 55 | $this->collection = $this->items(); |
| 56 | 56 | |
| 57 | 57 | if ($id) { |
| 58 | - $this->collection = $this->collection->prune(function ($node) use ($id) { |
|
| 58 | + $this->collection = $this->collection->prune(function($node) use ($id) { |
|
| 59 | 59 | return !in_array($id, $node->pluckAncestors('id')); |
| 60 | 60 | }); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $menu = $this->collection->mapRecursive(function ($node) { |
|
| 63 | + $menu = $this->collection->mapRecursive(function($node) { |
|
| 64 | 64 | $entry = $node->entry(); |
| 65 | 65 | $label = $entry->label; |
| 66 | - $entry->label = $node->depth() != 0 ? (str_repeat('-', $node->depth())) . '>' : ''; |
|
| 66 | + $entry->label = $node->depth() != 0 ? (str_repeat('-', $node->depth())).'>' : ''; |
|
| 67 | 67 | $entry->label .= $label; |
| 68 | 68 | |
| 69 | 69 | return $node->replaceEntry($entry); |
| 70 | 70 | }); |
| 71 | 71 | |
| 72 | 72 | $menuitems = collect(); |
| 73 | - $menu->flatten()->each(function ($node) use ($menuitems) { |
|
| 73 | + $menu->flatten()->each(function($node) use ($menuitems) { |
|
| 74 | 74 | $menuitems[] = [ |
| 75 | 75 | 'label' => $node->label, |
| 76 | 76 | 'id' => $node->id, |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | if (in_array($menu->order, $sequence)) { |
| 55 | 55 | foreach ($sequence as $id => $order) { |
| 56 | 56 | if ($order < $menu->order) { |
| 57 | - } else { |
|
| 57 | + }else { |
|
| 58 | 58 | $sequence[$id]++; |
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $sequence = $sequence + [$menu->id => $menu->order]; |
|
| 63 | + $sequence = $sequence+[$menu->id => $menu->order]; |
|
| 64 | 64 | |
| 65 | 65 | asort($sequence); |
| 66 | 66 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | private function reorder(array $sequence) |
| 71 | 71 | { |
| 72 | - array_walk($sequence, function ($order, $id) { |
|
| 72 | + array_walk($sequence, function($order, $id) { |
|
| 73 | 73 | MenuItem::withoutGlobalScope(SoftDeletingScope::class) |
| 74 | 74 | ->where('id', $id) |
| 75 | 75 | ->update(['order' => $order]); |
@@ -26,14 +26,14 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $types = config('thinktomorrow.chief.menus', []); |
| 28 | 28 | |
| 29 | - return collect($types)->map(function ($menu, $key) { |
|
| 29 | + return collect($types)->map(function($menu, $key) { |
|
| 30 | 30 | return new static($key, $menu['label'], $menu['view']); |
| 31 | 31 | }); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public static function find($key): ?self |
| 35 | 35 | { |
| 36 | - return static::all()->filter(function ($menu) use ($key) { |
|
| 36 | + return static::all()->filter(function($menu) use ($key) { |
|
| 37 | 37 | return $menu->key() == $key; |
| 38 | 38 | })->first(); |
| 39 | 39 | } |
@@ -82,10 +82,10 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | $menu = []; |
| 84 | 84 | |
| 85 | - $this->items()->each(function ($item) use (&$menu) { |
|
| 85 | + $this->items()->each(function($item) use (&$menu) { |
|
| 86 | 86 | $menu[] = sprintf('<li><a href="%s">%s</a></li>', $item->url, $item->label); |
| 87 | 87 | }); |
| 88 | 88 | |
| 89 | - return '<ul>' . implode('', $menu) . '</ul>'; |
|
| 89 | + return '<ul>'.implode('', $menu).'</ul>'; |
|
| 90 | 90 | } |
| 91 | 91 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | public function message(): string |
| 18 | 18 | { |
| 19 | - return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="' . route('chief.back.settings.edit') . '" class="text-secondary-800 underline hover:text-white">Settings</a>'; |
|
| 19 | + return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Settings</a>'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | public function notifiers(): array |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | public function message(): string |
| 35 | 35 | { |
| 36 | - return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="' . route('chief.back.settings.edit') . '" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.'; |
|
| 36 | + return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.'; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | public function notifiers(): array |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | return; |
| 35 | - } else { |
|
| 35 | + }else { |
|
| 36 | 36 | foreach ($notifiers as $notifier) { |
| 37 | 37 | app($notifier)->onSuccess($checkInstance); |
| 38 | 38 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | public function getFullnameAttribute() |
| 59 | 59 | { |
| 60 | - return $this->firstname . ' ' . $this->lastname; |
|
| 60 | + return $this->firstname.' '.$this->lastname; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public function isSquantoDeveloper() |
@@ -67,6 +67,6 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | public function getShortNameAttribute() |
| 69 | 69 | { |
| 70 | - return $this->firstname . ' ' . substr($this->lastname, 0, 1) . '.'; |
|
| 70 | + return $this->firstname.' '.substr($this->lastname, 0, 1).'.'; |
|
| 71 | 71 | } |
| 72 | 72 | } |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | break; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - return '<span class="label ' . $flair . '">uitnodiging ' . $this->invitation->stateOf(InvitationState::KEY) . '</span>'; |
|
| 39 | + return '<span class="label '.$flair.'">uitnodiging '.$this->invitation->stateOf(InvitationState::KEY).'</span>'; |
|
| 40 | 40 | } |
| 41 | 41 | } |