<commit_before><?php

namespace Gornymedia\Shortcodes;

use Illuminate\Support\ServiceProvider;
use Gornymedia\Shortcodes\Illuminate\View\Factory;

class ShortcodesServiceProvider extends ServiceProvider {

    /**
     * Register the service provider.
     * 
     * @return void
     */
    public function register() {
        $this->registerShortcode();
        $this->registerView();
    }

    /**
     * Register the Shortcode
     */
    public function registerShortcode() {
        $this->app->bindShared('shortcode', function($app) {
            return new Shortcode();
        });
    }

    /**
     * Register the View
     */
    public function registerView() {
        $this->app->bindShared('view', function($app) {
            $resolver = $app['view.engine.resolver'];
            $finder = $app['view.finder'];
            $env = new Factory($resolver, $finder, $app['events'], $app['shortcode']);
            $env->setContainer($app);<commit_msg>Update ShortcodesServiceProvider.php<commit_after><?php

namespace Gornymedia\Shortcodes;

use Illuminate\Support\ServiceProvider;
use Gornymedia\Shortcodes\Illuminate\View\Factory;

class ShortcodesServiceProvider extends ServiceProvider {

    /**
     * Register the service provider.
     * 
     * @return void
     */
    public function register() {
        $this->registerShortcode();
        $this->registerView();
    }

    /**
     * Register the Shortcode
     */
    public function registerShortcode() {
        $this->app->singleton('shortcode', function($app) {
            return new Shortcode();
        });
    }

    /**
     * Register the View
     */
    public function registerView() {
        $this->app->singleton('view', function($app) {
            $resolver = $app['view.engine.resolver'];
            $finder = $app['view.finder'];
            $env = new Factory($resolver, $finder, $app['events'], $app['shortcode']);
            $env->setContainer($app);
{'fraction_non_alphanumeric': 0.14271099744245525, 'fraction_numerical': 0.0, 'mean_word_length': 2.511669658886894, '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': '1359963', 'n_tokens_mistral': 535, 'n_tokens_neox': 536, 'n_words': 104}