<commit_before><?php

namespace Zeropingheroes\Lanager\Providers;

use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
use Zeropingheroes\Lanager\Achievement;
use Zeropingheroes\Lanager\Policies\AchievementPolicy;
use Zeropingheroes\Lanager\EventSignup;
use Zeropingheroes\Lanager\Policies\EventSignupPolicy;
use Zeropingheroes\Lanager\Policies\ImagePolicy;
use Zeropingheroes\Lanager\Policies\SlidePolicy;
use Zeropingheroes\Lanager\Policies\VenuePolicy;
use Zeropingheroes\Lanager\Slide;
use Zeropingheroes\Lanager\UserAchievement;
use Zeropingheroes\Lanager\Policies\UserAchievementPolicy;
use Zeropingheroes\Lanager\RoleAssignment;
use Zeropingheroes\Lanager\Policies\RoleAssignmentPolicy;
use Zeropingheroes\Lanager\Log;
use Zeropingheroes\Lanager\Policies\LogPolicy;
use Zeropingheroes\Lanager\Guide;
use Zeropingheroes\Lanager\Policies\GuidePolicy;
use Zeropingheroes\Lanager\NavigationLink;
use Zeropingheroes\Lanager\Policies\NavigationLinkPolicy;
use Zeropingheroes\Lanager\Lan;
use Zeropingheroes\Lanager\Policies\LanPolicy;
use Zeropingheroes\Lanager\Event;
use Zeropingheroes\Lanager\Policies\EventPolicy;
use Zeropingheroes\Lanager\User;
use Zeropingheroes\Lanager\Policies\UserPolicy;
use Zeropingheroes\Lanager\Venue;

class AuthServiceProvider extends ServiceProvider
{
    /**
     * The policy mappings for the application.
     *
     * @var array
     */
    protected $policies = [

        // Remember to import the classes, as no error will be thrown if you don't!
        RoleAssignment::class   => RoleAssignmentPolicy::class,
        Log::class              => LogPolicy::class,
        Guide::class            => GuidePolicy::class,
        NavigationLink::class   => NavigationLinkPolicy::class,
        Lan::class              => LanPolicy::class,
        Event::class            => EventPolicy::class,
        User::class             => UserPolicy::class,
        EventSignup::class      => EventSignupPolicy::class,
        Achievement::class      => AchievementPolicy::class,
        UserAchievement::class  => UserAchievementPolicy::class,
        Venue::class            => VenuePolicy::class,
        Slide::class            => SlidePolicy::class,
    ];

    /**
     * Register any authentication / authorization services.
     *
     * @return void
     */
    public function boot()
    {
        $this->registerPolicies();

        Gate::resource('images', ImagePolicy::class);
    }
}<commit_msg>Switch to autodiscovery of policies<commit_after><?php

namespace Zeropingheroes\Lanager\Providers;

use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
use Zeropingheroes\Lanager\Policies\ImagePolicy;

class AuthServiceProvider extends ServiceProvider
{
    /**
     * The policy mappings for the application.
     *
     * @var array
     */
    protected $policies = [];

    /**
     * Register any authentication / authorization services.
     *
     * @return void
     */
    public function boot()
    {
        $this->registerPolicies();

        Gate::resource('images', ImagePolicy::class);
    }
}
{'fraction_non_alphanumeric': 0.09764521193092622, 'fraction_numerical': 0.0, 'mean_word_length': 3.6107091172214183, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '2632466', 'n_tokens_mistral': 975, 'n_tokens_neox': 991, 'n_words': 166}