<commit_before><?php namespace Zeropingheroes\Lanager;

use Zeropingheroes\Lanager\Events\EventService,
	Zeropingheroes\Lanager\EventTypes\EventTypeService;
use View, Notification, Redirect;
use View, Notification, Redirect, Authority, App;

class EventsController extends BaseController {

	/**
	 * Based named route used by this resource
	 * @var string
	 */
	protected $route = 'events';

	/**
	 * Set the controller's service
	 */
	public function __construct()
	{
		parent::__construct();
		$this->service = new EventService($this);
	}

	/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */
	public function index()
	{
		if( Authority::cannot('manage', 'events') ) $this->service->where('published', true);

		$events = $this->service<commit_msg>Hiding unpublished events from standard users (2)<commit_after><?php namespace Zeropingheroes\Lanager;

use Zeropingheroes\Lanager\Events\EventService,
	Zeropingheroes\Lanager\EventTypes\EventTypeService;
use View, Notification, Redirect, Authority, App;

class EventsController extends BaseController {

	/**
	 * Based named route used by this resource
	 * @var string
	 */
	protected $route = 'events';

	/**
	 * Set the controller's service
	 */
	public function __construct()
	{
		parent::__construct();
		$this->service = new EventService($this);
	}

	/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */
	public function index()
	{
		if( Authority::cannot('manage', 'events') ) $this->service->where('published', true);

		$events = $this->service
{'fraction_non_alphanumeric': 0.13018134715025906, 'fraction_numerical': 0.0006476683937823834, 'mean_word_length': 4.459363957597173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '2870567', 'n_tokens_mistral': 495, 'n_tokens_neox': 451, 'n_words': 123}