<commit_before><?php

if (!defined('LARAVELFLY_MODE')) return [];

$IN_PRODUCTION = env('APP_ENV') === 'production' || env('APP_ENV') === 'product';

use Illuminate\Contracts\Auth\Access\Gate as GateContract;

return [
    /**
     * If use cache file for config/laravel.php always.
     *
     * If true, Laravelfly will always use cache file
     *  laravelfly_ps_map.php
     * or
     *  laravelfly_ps_simple.php
     * and laravelfly_aliases.php
     * under bootstrap/cache/ when the files exist. If not exist, Laravelfly will create them.
     *
     * It's better to set it to false in dev env , set true and run `php artisan config:clear` before starting LaravelFly in production env
     */
    'config_cache_always' => $IN_PRODUCTION,
    // 'config_cache_always' => true,

    /**
     * For each worker, if a view file is compiled max one time. Only For Mode Map
     *
     * If true, Laravel not know a view file changed until the swoole workers restart.
     * It's good for production env.
     */
    'view_compile_1' => $IN_PRODUCTION && LARAVELFLY_SERVICES['view.finder'],

    /**
     * useless providers. For Mode Backup, Map
     *
     * These providers are useless if they are not enabled in
     * config('laravelfly.providers_on_worker') or
     * config('laravelfly.providers_in_request')
     *
     * There providers will be removed from config('app.providers')
     */
    'providers_ignore' => array_merge([

        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Laravel\Tinker\TinkerServiceProvider::class,
        Fideloper\Proxy\TrustedProxyServiceProvider::class,
        LaravelFly\Providers\ServiceProvider::class,
        Hhxsv5\LaravelS\Illuminate\LaravelSServiceProvider::class,
        'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',

    ], LARAVELFLY_SERVICES['broadcast'] ? [] : [
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Broadcasting\BroadcastManager::class,
        Illuminate\Contracts\Broadcasting\Broadcaster::class,
        App\Providers\BroadcastServiceProvider::class
    ]
    ),

    /**
     * Providers to reg and boot in each request.For Mode Backup, Map
     *
     * There providers will be removed from app('config')['app.providers'] on worker, before any requests
     */
    'providers_in_request' => [
    ],


    /**
     * providers to reg and boot on worker, before any request. only for Mode Map
     *
     * you can also supply singleton services to made on worker
     * only singleton services are useful and valid here.
     * a singeton service is like this:
     *     *   $this->app->singleton('hash', function ($app) { ... });
     *
     * There are two types of singleton services:
     *   - COROUTINE-FRIENDLY SERVICE
     *   - CLONE SERVICE
     *
     * Read more about COROUTINE-FRIENDLY SERVICE at
     * https://github.com/scil/LaravelFly/wiki/WORKER-OBJECT
     *
     * CLONE SERVICE: any service can be a CLONE SERVICE, but take care of
     * Stale Reference https://github.com/scil/LaravelFly/wiki/clone-and-Stale-Reference
     *
     * If a service is not a COROUTINE-FRIENDLY SERVICE, neither a CLONE SERVICE that Stale Reference handled,
     * it should not be made on worker.<commit_msg>add comments<commit_after><?php

if (!defined('LARAVELFLY_MODE')) return [];

$IN_PRODUCTION = env('APP_ENV') === 'production' || env('APP_ENV') === 'product';

use Illuminate\Contracts\Auth\Access\Gate as GateContract;

return [
    /**
     * If use cache file for config/laravel.php always.
     *
     * If true, Laravelfly will always use cache file
     *  laravelfly_ps_map.php
     * or
     *  laravelfly_ps_simple.php
     * and laravelfly_aliases.php
     * under bootstrap/cache/ when the files exist. If not exist, Laravelfly will create them.
     *
     * It's better to set it to false in dev env , set true and run `php artisan config:clear` before starting LaravelFly in production env
     */
    'config_cache_always' => $IN_PRODUCTION,
    // 'config_cache_always' => true,

    /**
     * For each worker, if a view file is compiled max one time. Only For Mode Map
     *
     * If true, Laravel not know a view file changed until the swoole workers restart.
     * It's good for production env.
     */
    'view_compile_1' => $IN_PRODUCTION && LARAVELFLY_SERVICES['view.finder'],

    /**
     * useless providers. For Mode Backup, Map
     *
     * These providers are useless if they are not enabled in
     * config('laravelfly.providers_on_worker') or
     * config('laravelfly.providers_in_request')
     *
     * There providers will be removed from config('app.providers')
     */
    'providers_ignore' => array_merge([

        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Laravel\Tinker\TinkerServiceProvider::class,
        Fideloper\Proxy\TrustedProxyServiceProvider::class,
        LaravelFly\Providers\ServiceProvider::class,
        Hhxsv5\LaravelS\Illuminate\LaravelSServiceProvider::class,
        'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',

    ], LARAVELFLY_SERVICES['broadcast'] ? [] : [
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Broadcasting\BroadcastManager::class,
        Illuminate\Contracts\Broadcasting\Broadcaster::class,
        App\Providers\BroadcastServiceProvider::class
    ]
    ),

    /**
     * Providers to reg and boot in each request.For Mode Backup, Map
     *
     * There providers will be removed from app('config')['app.providers'] on worker, before any requests
     */
    'providers_in_request' => [
    ],


    /**
     * providers to reg and boot on worker, before any request. only for Mode Map
     *
     * you can also supply singleton services to made on worker
     * only singleton services are useful and valid here.
     * a singeton service is like this:
     *     *   $this->app->singleton('hash', function ($app) { ... });
     *
     * There are two types of singleton services:
     *   - COROUTINE-FRIENDLY SERVICE
     *   - CLONE SERVICE
     *
     * Read more about COROUTINE-FRIENDLY SERVICE at
     * https://github.com/scil/LaravelFly/wiki/WORKER-OBJECT
     *
     * CLONE SERVICE: any service can be a CLONE SERVICE, but take care of
     * Stale Reference https://github.com/scil/LaravelFly/wiki/clone-and-Stale-Reference
     *
     * If a service is not a COROUTINE-FRIENDLY SERVICE, neither a CLONE SERVICE that Stale Reference fixed,
     * it should not be list here.
{'fraction_non_alphanumeric': 0.09920391916717697, 'fraction_numerical': 0.000612369871402327, 'mean_word_length': 2.8956469886702445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '2220743', 'n_tokens_mistral': 2000, 'n_tokens_neox': 1949, 'n_words': 545}