<commit_before><?php namespace Orchestra\Foundation;

use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;

class FoundationServiceProvider extends ServiceProvider
{
    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->app['orchestra.installed'] = false;

        $this->app['orchestra.app'] = $this->app->share(function ($app) {
            return new Application($app);
        });
    }

    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
        $this->package('orchestra/foundation', 'orchestra/foundation');

        $loader = AliasLoader::getInstance();
        $loader->alias('Orchestra\Asset', 'Orchestra\Support\Facades\Asset');
        $loader->alias('Orchestra\Acl', 'Orchestra\Support\Facades\Acl');
        $loader->alias('Orchestra\App', 'Orchestra\Support\Facades\App');
        $loader->alias('Orchestra\Config', 'Orchestra\Support\Facades\Config');
        $loader->alias('Orchestra\Extension', 'Orchestra\Support\Facades\Extension');
        $loader->alias('Orchestra\Form', 'Orchestra\Support\Facades\Form');
        $loader->alias('Orchestra\Mail', 'Orchestra\Support\Facades\Mail');
        $loader->alias('Orchestra\Memory', 'Orchestra\Support\Facades\Memory');
        $loader->alias('Orchestra\Messages', 'Orchestra\Support\Facades\Messages');
        $loader->alias('Orchestra\Profiler', 'Orchestra\Debug\Facades\Profiler');
        $loader->alias('Orchestra\Resources', 'Orchestra\Support\Facades\Resources');
        $loader->alias('Orchestra\Site', 'Orchestra\Support\Facades\Site');
        $loader->alias('Orchestra\Table', 'Orchestra\Support\Facades\Table');
        $loader->alias('Orchestra\Theme', 'Orchestra\Support\Facades\Theme');
        $loader->alias('Orchestra\Widget', 'Orchestra\Support\Facades\Widget');

        $this->app['orchestra.app']->boot();

        include __DIR__."/../../start.php";

        $this->app['events']->fire('orchestra.ready');
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return array('orchestra.app', 'orchestra.installed');
    }
}<commit_msg>Move alias loading to register process.<commit_after><?php namespace Orchestra\Foundation;

use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;

class FoundationServiceProvider extends ServiceProvider
{
    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->app['orchestra.installed'] = false;

        $this->app['orchestra.app'] = $this->app->share(function ($app) {
            return new Application($app);
        });

        $this->registerAliases();
    }

    /**
     * Register application aliases.
     *
     * @return void
     */
    protected function registerAliases()
    {
        $loader = AliasLoader::getInstance();
        $loader->alias('Orchestra\Asset', 'Orchestra\Support\Facades\Asset');
        $loader->alias('Orchestra\Acl', 'Orchestra\Support\Facades\Acl');
        $loader->alias('Orchestra\App', 'Orchestra\Support\Facades\App');
        $loader->alias('Orchestra\Config', 'Orchestra\Support\Facades\Config');
        $loader->alias('Orchestra\Extension', 'Orchestra\Support\Facades\Extension');
        $loader->alias('Orchestra\Form', 'Orchestra\Support\Facades\Form');
        $loader->alias('Orchestra\Mail', 'Orchestra\Support\Facades\Mail');
        $loader->alias('Orchestra\Memory', 'Orchestra\Support\Facades\Memory');
        $loader->alias('Orchestra\Messages', 'Orchestra\Support\Facades\Messages');
        $loader->alias('Orchestra\Profiler', 'Orchestra\Debug\Facades\Profiler');
        $loader->alias('Orchestra\Resources', 'Orchestra\Support\Facades\Resources');
        $loader->alias('Orchestra\Site', 'Orchestra\Support\Facades\Site');
        $loader->alias('Orchestra\Table', 'Orchestra\Support\Facades\Table');
        $loader->alias('Orchestra\Theme', 'Orchestra\Support\Facades\Theme');
        $loader->alias('Orchestra\Widget', 'Orchestra\Support\Facades\Widget');
    }

    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
        $path = realpath(__DIR__.'/../../');

        $this->package('orchestra/foundation', 'orchestra/foundation', $path);

        $this->app['orchestra.app']->boot();

        include "{$path}/start.php";

        $this->app['events']->fire('orchestra.ready');
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return array('orchestra.app', 'orchestra.installed');
    }
}
{'fraction_non_alphanumeric': 0.1682592438720399, 'fraction_numerical': 0.0, 'mean_word_length': 3.039429530201342, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 52, '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': '2364795', 'n_tokens_mistral': 1381, 'n_tokens_neox': 1447, 'n_words': 197}