<commit_before><?php namespace Aedart\Scaffold\Providers;

use Illuminate\Support\ServiceProvider;
use Aedart\Scaffold\Contracts\Collections\AskablePropertiesCollection as AskablePropertiesCollectionInterface;
use Aedart\Scaffold\Collections\AskablePropertiesCollection;
use Aedart\Scaffold\Contracts\Collections\TemplatesCollection as TemplatesCollectionInterface;
use Aedart\Scaffold\Collections\TemplatesCollection;
use Aedart\Scaffold\Contracts\Data\Scaffold as ScaffoldInterface;
use Aedart\Scaffold\Data\Scaffold;
use Aedart\Scaffold\Contracts\Data\Template as TemplateInterface;
use Aedart\Scaffold\Data\Template;
use Aedart\Scaffold\Contracts\Data\AskableProperty as AskablePropertyInterface;
use Aedart\Scaffold\Data\AskableProperty;

/**
 * Class ScaffoldServiceProvider
 *
 * @author <NAME> <<EMAIL>>
 * @package Aedart\Scaffold\Providers
 */
class ScaffoldServiceProvider extends ServiceProvider{

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register() {
        $this->registerAskableProperty();
        $this->registerTemplate();
        $this->registerAskablePropertiesCollection();
        $this->registerTemplatesCollection();
        $this->registerScaffold();
    }

    /******************************************************
     * Register methods
     *****************************************************/

    /**
     * Register the askable-property (dto)
     */
    public function registerAskableProperty() {
        $this->app->bind(AskablePropertyInterface::class, function($app, array $data = []){
            return new AskableProperty($data);
        });
    }

    /**
     * Register the template (dto)
     */
    public function registerTemplate() {
        $this->app->bind(TemplateInterface::class, function($app, array $data = []){
            return new Template($data);
        });
    }

    /**
     * Register the scaffold (dto)
     */
    public function registerScaffold() {
        $this->app->bind(ScaffoldInterface::class, function($app, array $data = []){
            return new Scaffold($data);
        });
    }

    /**
     * Register the askable-properties collection
     */
    public function registerAskablePropertiesCollection() {
        $this->app->bind(AskablePropertiesCollectionInterface::class, function($app, array $data = []){
            return new AskablePropertiesCollection($data);
        });
    }

    /**
     * Register the templates collection
     */
    public function registerTemplatesCollection() {
        $this->app->bind(TemplatesCollectionInterface::class, function($app, array $data = []){
            return new TemplatesCollection($data);
        });
    }
}<commit_msg>Registered the Twig template engine as a default<commit_after><?php namespace Aedart\Scaffold\Providers;

use Aedart\Scaffold\Contracts\Engines\TemplateEngine;
use Aedart\Scaffold\Engines\Twig;
use Illuminate\Support\ServiceProvider;
use Aedart\Scaffold\Contracts\Collections\AskablePropertiesCollection as AskablePropertiesCollectionInterface;
use Aedart\Scaffold\Collections\AskablePropertiesCollection;
use Aedart\Scaffold\Contracts\Collections\TemplatesCollection as TemplatesCollectionInterface;
use Aedart\Scaffold\Collections\TemplatesCollection;
use Aedart\Scaffold\Contracts\Data\Scaffold as ScaffoldInterface;
use Aedart\Scaffold\Data\Scaffold;
use Aedart\Scaffold\Contracts\Data\Template as TemplateInterface;
use Aedart\Scaffold\Data\Template;
use Aedart\Scaffold\Contracts\Data\AskableProperty as AskablePropertyInterface;
use Aedart\Scaffold\Data\AskableProperty;

/**
 * Class ScaffoldServiceProvider
 *
 * @author <NAME> <<EMAIL>>
 * @package Aedart\Scaffold\Providers
 */
class ScaffoldServiceProvider extends ServiceProvider{

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register() {
        $this->registerAskableProperty();
        $this->registerTemplate();
        $this->registerAskablePropertiesCollection();
        $this->registerTemplatesCollection();
        $this->registerScaffold();
        $this->registerDefaultTemplateEngine();
    }

    /******************************************************
     * Register methods
     *****************************************************/

    /**
     * Register the askable-property (dto)
     */
    public function registerAskableProperty() {
        $this->app->bind(AskablePropertyInterface::class, function($app, array $data = []){
            return new AskableProperty($data);
        });
    }

    /**
     * Register the template (dto)
     */
    public function registerTemplate() {
        $this->app->bind(TemplateInterface::class, function($app, array $data = []){
            return new Template($data);
        });
    }

    /**
     * Register the scaffold (dto)
     */
    public function registerScaffold() {
        $this->app->bind(ScaffoldInterface::class, function($app, array $data = []){
            return new Scaffold($data);
        });
    }

    /**
     * Register the askable-properties collection
     */
    public function registerAskablePropertiesCollection() {
        $this->app->bind(AskablePropertiesCollectionInterface::class, function($app, array $data = []){
            return new AskablePropertiesCollection($data);
        });
    }

    /**
     * Register the templates collection
     */
    public function registerTemplatesCollection() {
        $this->app->bind(TemplatesCollectionInterface::class, function($app, array $data = []){
            return new TemplatesCollection($data);
        });
    }

    /**
     * Register the default template engine collection
     */
    public function registerDefaultTemplateEngine() {
        $this->app->bind(TemplateEngine::class, function($app){
            return new Twig();
        });
    }
}
{'fraction_non_alphanumeric': 0.14905982905982906, 'fraction_numerical': 0.0, 'mean_word_length': 3.399248120300752, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 42, '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': '2637999', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1549, 'n_words': 290}