<commit_before><?php

class DashboardController extends BaseController {

	public function index()
	{
		if (Sentry::inGroup(Sentry::findGroupByName('Admins')))
		{

			return View::make('dashboard.admin');
		} else {

			return View::make('dashboard.user');
		}
	}
}<commit_msg>Get support tickets by statuses and pass to the admin view<commit_after><?php

class DashboardController extends BaseController {

	protected $ticket;

	public function __construct(Ticket $ticket)
	{
		$this->ticket = $ticket;
	}

	public function index()
	{
		if (Sentry::inGroup(Sentry::findGroupByName('Admins')))
		{
			$openTickets = $this->ticket->getOpenTickets();
			$inProgressTickets = $this->ticket->getInProgressTickets();


			return View::make('dashboard.admin')
				->with('openTickets', $openTickets)
				->with('inProgressTickets', $inProgressTickets);
		} else {

			return View::make('dashboard.user');
		}
	}


}
{'fraction_non_alphanumeric': 0.14835164835164835, 'fraction_numerical': 0.0, 'mean_word_length': 4.915584415584416, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '116622', 'n_tokens_mistral': 332, 'n_tokens_neox': 296, 'n_words': 56}