Skip to content

Commit

Permalink
Respecting PSR-2
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Dec 30, 2014
1 parent 5b1a823 commit 70d73c7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Http/Controllers/Admin/MenuItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function update(Menu $menu, Menuitem $menuItem, UpdateMenuItemRequest $re
$this->menuItem->update($menuItem, $this->addMenuId($menu, $request));

Flash::success(trans('menu::messages.menuitem updated'));

return $this->redirector->route('dashboard.menu.edit', [$menu->id]);
}

Expand All @@ -68,6 +69,7 @@ public function destroy(Menu $menu, Menuitem $menuItem)
$this->menuItem->destroy($menuItem);

Flash::success(trans('menu::messages.menuitem deleted'));

return $this->redirector->route('dashboard.menu.edit', [$menu->id]);
}

Expand Down
2 changes: 1 addition & 1 deletion Repositories/Cache/CacheMenuItemDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function () use ($menuId) {
/**
* Get all root elements
*
* @param int $menuId
* @param int $menuId
* @return object
*/
public function allRootsForMenu($menuId)
Expand Down
7 changes: 6 additions & 1 deletion Services/MenuOrdener.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php namespace Modules\Menu\Services;

use Modules\Menu\Entities\Menuitem;
use Modules\Menu\Repositories\MenuItemRepository;

class MenuOrdener
Expand Down Expand Up @@ -43,7 +44,11 @@ private function order($position, $item)
}
}

private function handleChildrenForParent($parent, $children)
/**
* @param Menuitem $parent
* @param array $children
*/
private function handleChildrenForParent(Menuitem $parent, array $children)
{
foreach ($children as $position => $item) {
$menuItem = $this->menuItemRepository->find($item['id']);
Expand Down

0 comments on commit 70d73c7

Please sign in to comment.