From 8b6b6fef4854d9151a28996c6ffd2f522de4dbd9 Mon Sep 17 00:00:00 2001 From: Pablo Reyes Date: Wed, 12 Sep 2018 20:20:37 -0300 Subject: [PATCH] Licence added, composer fixed (#2) * Licence added * composer updated * small fix on composer --- LICENSE | 21 +++++++++++++++++++++ composer.json | 12 +----------- src/ServiceProvider.php | 29 +++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 LICENSE create mode 100644 src/ServiceProvider.php diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b84f5cb --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Reyesoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/composer.json b/composer.json index aaf25c1..0a48fae 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,7 @@ ], "type": "library", "minimum-stability": "stable", + "license": "MIT", "authors": [ { "name": "Pablo Reyes", @@ -22,14 +23,10 @@ "fzaninotto/faker": "~1.4" }, "require-dev": { - "genealabs/laravel-model-caching": "0.2.63", - "orchestra/testbench": "3.4.*|3.5.*|3.6.*", "reyesoft/ci": "0.1.3", "squizlabs/php_codesniffer": "3.3.0", "phpunit/phpunit": "7.2.6", "codedungeon/phpunit-result-printer": "0.19.10", - "barryvdh/laravel-ide-helper": "2.4.3", - "doctrine/dbal": "2.7.1", "sebastian/phpcpd": "4.0.0" }, "autoload": { @@ -37,13 +34,6 @@ "ArgentinaDataGenerator\\": "src/" } }, - "extra": { - "laravel": { - "providers": [ - "Reyesoft\\JsonApi\\ServiceProvider" - ] - } - }, "autoload-dev": { "psr-4": { "Tests\\": "tests" diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php new file mode 100644 index 0000000..f278437 --- /dev/null +++ b/src/ServiceProvider.php @@ -0,0 +1,29 @@ +. + * + * This file is part of JsonApiPlayground. JsonApiPlayground can not be copied and/or + * distributed without the express permission of Reyesoft + */ + +declare(strict_types=1); + +namespace Reyesoft\JsonApi; + +use Illuminate\Support\ServiceProvider as BaseServiceProvider; + +/** + * @codeCoverageIgnore + */ +class ServiceProvider extends BaseServiceProvider +{ + public function register(): void + { + $this->app->singleton('Faker', function($app) { + $faker = \Faker\Factory::create(); + $faker->addProvider(\ArgentinaDataGenerator\CuitFakerProvider::class); + return $faker; + }); + } +}