<commit_before><?php
namespace DreamFactory\Core\Rws;

use DreamFactory\Core\Components\ServiceDocBuilder;
use DreamFactory\Core\Enums\ServiceTypeGroups;
use DreamFactory\Core\Rws\Models\RwsConfig;
use DreamFactory\Core\Rws\Services\RemoteWeb;
use DreamFactory\Core\Services\ServiceManager;
use DreamFactory\Core\Services\ServiceType;

class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
    use ServiceDocBuilder;

    public function register()
    {
        // Add our service types.
        $this->app->resolving('df.service', function (ServiceManager $df) {
            $df->addType(
                new ServiceType([
                    'name'            => 'rws',
                    'label'           => 'HTTP Service',
                    'description'     => 'A service to handle Remote Web Services',
                    'group'           => ServiceTypeGroups::REMOTE,
                    'config_handler'  => RwsConfig::class,
                    'default_api_doc' => function ($service) {
                        return $this->buildServiceDoc($service->id, RemoteWeb::getApiDocInfo($service));
                    },
                    'factory'         => function ($config) {
                        return new RemoteWeb($config);
                    },
                ])
            );
        });
    }
}<commit_msg>Restructuring to upgrade to Laravel 5.4<commit_after><?php
namespace DreamFactory\Core\Rws;

use DreamFactory\Core\Components\ServiceDocBuilder;
use DreamFactory\Core\Enums\ServiceTypeGroups;
use DreamFactory\Core\Rws\Models\RwsConfig;
use DreamFactory\Core\Rws\Services\RemoteWeb;
use DreamFactory\Core\Services\ServiceManager;
use DreamFactory\Core\Services\ServiceType;

class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
    use ServiceDocBuilder;

    public function boot()
    {
        // Add our service types.
        $this->app->resolving('df.service', function (ServiceManager $df) {
            $df->addType(
                new ServiceType([
                    'name'            => 'rws',
                    'label'           => 'HTTP Service',
                    'description'     => 'A service to handle Remote Web Services',
                    'group'           => ServiceTypeGroups::REMOTE,
                    'config_handler'  => RwsConfig::class,
                    'default_api_doc' => function ($service) {
                        return $this->buildServiceDoc($service->id, RemoteWeb::getApiDocInfo($service));
                    },
                    'factory'         => function ($config) {
                        return new RemoteWeb($config);
                    },
                ])
            );
        });

        // add migrations
        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
    }
}
{'fraction_non_alphanumeric': 0.11087495572086432, 'fraction_numerical': 0.0007084661707403471, 'mean_word_length': 1.7822660098522167, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, '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': '2324285', 'n_tokens_mistral': 717, 'n_tokens_neox': 695, 'n_words': 137}