<commit_before><?php namespace Modules\Workshop\Sidebar;

use Maatwebsite\Sidebar\Group;
use Maatwebsite\Sidebar\Item;
use Maatwebsite\Sidebar\Menu;
use Modules\Core\Contracts\Authentication;

class SidebarExtender implements \Maatwebsite\Sidebar\SidebarExtender
{
    /**
     * @var Authentication
     */
    protected $auth;

    /**
     * @param Authentication $auth
     *
     * @internal param Guard $guard
     */
    public function __construct(Authentication $auth)
    {
        $this->auth = $auth;
    }

    /**
     * @param Menu $menu
     *
     * @return Menu
     */
    public function extendWith(Menu $menu)
    {
        $menu->group(trans('workshop::workshop.title'), function (Group $group) {
            $group->weight(100);
            $group->item(trans('workshop::workshop.modules'), function (Item $item) {
                $item->icon('fa fa-cogs');
                $item->weight(100);
                $item->route('admin.workshop.modules.index');
                $item->authorize(
                    $this->auth->hasAccess('workshop.modules.index')
                );
            });
            $group->item(trans('workshop::workshop.themes'), function (Item $item) {
                $item->icon('fa fa-cogs');
                $item->weight(101);
                $item->route('admin.workshop.themes.index');
                $item->authorize(
                    $this->auth->hasAccess('workshop.themes.index')
                );
            });
//            $group->item(trans('workshop::workshop.title'), function (Item $item) {
//                $item->weight(100);
//                $item->authorize(
//                    $this->auth->hasAccess('workshop.modules.index') or $this->auth->hasAccess('workshop.themes.index')
//                );
//                $item->item(trans('workshop::workshop.modules'), function (Item $item) {
//                    $item->icon('fa fa-cogs');
//                    $item->weight(100);
//                    $item->route('admin.workshop.modules.index');
//                    $item->authorize(
//                        $this->auth->hasAccess('workshop.modules.index')
//                    );
//                });
//            });<commit_msg>Removing commented code<commit_after><?php namespace Modules\Workshop\Sidebar;

use Maatwebsite\Sidebar\Group;
use Maatwebsite\Sidebar\Item;
use Maatwebsite\Sidebar\Menu;
use Modules\Core\Contracts\Authentication;

class SidebarExtender implements \Maatwebsite\Sidebar\SidebarExtender
{
    /**
     * @var Authentication
     */
    protected $auth;

    /**
     * @param Authentication $auth
     *
     * @internal param Guard $guard
     */
    public function __construct(Authentication $auth)
    {
        $this->auth = $auth;
    }

    /**
     * @param Menu $menu
     *
     * @return Menu
     */
    public function extendWith(Menu $menu)
    {
        $menu->group(trans('workshop::workshop.title'), function (Group $group) {
            $group->weight(100);
            $group->item(trans('workshop::workshop.modules'), function (Item $item) {
                $item->icon('fa fa-cogs');
                $item->weight(100);
                $item->route('admin.workshop.modules.index');
                $item->authorize(
                    $this->auth->hasAccess('workshop.modules.index')
                );
            });
            $group->item(trans('workshop::workshop.themes'), function (Item $item) {
                $item->icon('fa fa-cogs');
                $item->weight(101);
                $item->route('admin.workshop.themes.index');
                $item->authorize(
                    $this->auth->hasAccess('workshop.themes.index')
                );
            });
{'fraction_non_alphanumeric': 0.15551974214343273, 'fraction_numerical': 0.0064464141821112, 'mean_word_length': 1.7667161961367013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5256808', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1024, 'n_words': 153}