diff --git a/README.md b/README.md index 9a5624b..e971f01 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ VatCalculator ================ [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) -[![Build Status](https://travis-ci.org/sprocketbox/vat-calculator.svg)](https://travis-ci.org/sprocketbox/vat-calculator) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sprocketbox/vat-calculator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sprocketbox/vat-calculator/?branch=master) +[![Build Status](https://travis-ci.org/consilience/vat-calculator.svg)](https://travis-ci.org/consilience/vat-calculator) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/consilience/vat-calculator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sprocketbox/vat-calculator/?branch=master) [![codecov.io](https://codecov.io/github/sprocketbox/vat-calculator/coverage.svg?branch=master)](https://codecov.io/github/sprocketbox/vat-calculator?branch=master) [![StyleCI](https://styleci.io/repos/41703624/shield)](https://styleci.io/repos/41703624) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/adecb98a-8484-48cb-be13-803decc475bc/mini.png)](https://insight.sensiolabs.com/projects/adecb98a-8484-48cb-be13-803decc475bc) @@ -11,7 +11,7 @@ VatCalculator Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be. Can be used with **Laravel 6 / Cashier** — or **standalone**. -This is a fork of [mcpociot/vat-calculator](https://github.com/Sprocketbox/vat-calculator) updated to work with Laravel 6. +This is a fork of [mcpociot/vat-calculator](https://github.com/consilience/vat-calculator) updated to work with Laravel 6. ```php // Easy to use! @@ -64,7 +64,7 @@ All documentation examples use the Laravel 5 facade code, so make sure not to ca Example: ```php -use Sprocketbox\VatCalculator\VatCalculator; +use Consilience\VatCalculator\VatCalculator; $vatCalculator = new VatCalculator(); $vatCalculator->setBusinessCountryCode('DE'); @@ -179,7 +179,7 @@ If you want to use this package in combination with [Laravel Cashier](https://gi ```php use Laravel\Cashier\Billable; -use Sprocketbox\VatCalculator\Concerns\BillableWithinTheEU; +use Consilience\VatCalculator\Concerns\BillableWithinTheEU; use Laravel\Cashier\Contracts\Billable as BillableContract; class User extends Model implements BillableContract @@ -247,7 +247,7 @@ The Javascript library has no dependencies on third party frameworks. In order to use the Javascript helper you need to publish the package files first. Go ahead and type: ```bash -$ php artisan vendor:publish --provider="Sprocketbox\VatCalculator\VatCalculatorServiceProvider" +$ php artisan vendor:publish --provider="Consilience\VatCalculator\VatCalculatorServiceProvider" ``` Now you have a file called `vat_calculator.js` in your `public/js` folder. @@ -395,7 +395,7 @@ The configuration file also determines whether you want to use the VAT Calculato To publish the configuration files, run the `vendor:publish` command ```bash -$ php artisan vendor:publish --provider="Sprocketbox\VatCalculator\VatCalculatorServiceProvider" +$ php artisan vendor:publish --provider="Consilience\VatCalculator\VatCalculatorServiceProvider" ``` This will create a `vat_calculator.php` in your config directory. diff --git a/composer.json b/composer.json index a3e1ebd..307ebf3 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "sprocketbox/vat-calculator", + "name": "consilience/vat-calculator", "description": "EU VAT calculation, the way it should be.", "keywords": [ "VAT", @@ -35,7 +35,7 @@ }, "autoload": { "psr-4": { - "Sprocketbox\\VatCalculator\\": "src/" + "Consilience\\VatCalculator\\": "src/" } }, "minimum-stability": "stable", @@ -45,10 +45,10 @@ "extra": { "laravel": { "providers": [ - "Sprocketbox\\VatCalculator\\VatCalculatorServiceProvider" + "Consilience\\VatCalculator\\VatCalculatorServiceProvider" ], "aliases": { - "VatCalculator": "Sprocketbox\\VatCalculator\\Facades\\VatCalculator" + "VatCalculator": "Consilience\\VatCalculator\\Facades\\VatCalculator" } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0ede8d8..11aa33a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/Sprocketbox/ + src/Consilience/ diff --git a/src/Concerns/BillableWithinTheEU.php b/src/Concerns/BillableWithinTheEU.php index d46e723..650b8bf 100644 --- a/src/Concerns/BillableWithinTheEU.php +++ b/src/Concerns/BillableWithinTheEU.php @@ -1,8 +1,8 @@ calculator = new \Sprocketbox\VatCalculator\VatCalculator($configRepository); + $this->calculator = new VatCalculator($configRepository); } /** @@ -82,7 +82,7 @@ public function getCountryCode() * * @param string $vat_id * - * @throws \Sprocketbox\VatCalculator\Exceptions\VATCheckUnavailableException + * @throws \Consilience\VatCalculator\Exceptions\VATCheckUnavailableException * * @return \Illuminate\Http\Response */ diff --git a/src/Exceptions/VATCheckUnavailableException.php b/src/Exceptions/VATCheckUnavailableException.php index da7d1d7..e98f61f 100644 --- a/src/Exceptions/VATCheckUnavailableException.php +++ b/src/Exceptions/VATCheckUnavailableException.php @@ -1,6 +1,6 @@ app->booting(function () { $loader = AliasLoader::getInstance(); - $loader->alias('VatCalculator', 'Sprocketbox\VatCalculator\Facades\VatCalculator'); + $loader->alias('VatCalculator', 'Consilience\VatCalculator\Facades\VatCalculator'); }); } @@ -112,7 +112,7 @@ protected function registerValidatorExtension() ); $this->app['validator']->extend('vat_number', - 'Sprocketbox\VatCalculator\Validators\VatCalculatorValidatorExtension@validateVatNumber'); + 'Consilience\VatCalculator\Validators\VatCalculatorValidatorExtension@validateVatNumber'); } /** diff --git a/src/routes.php b/src/routes.php index 5ea840a..6c9516b 100644 --- a/src/routes.php +++ b/src/routes.php @@ -1,6 +1,6 @@ shouldReceive('extend'); $app['validator']->shouldReceive('addNamespace'); $app['validator']->shouldReceive('resolver'); - $sp = m::mock('Sprocketbox\VatCalculator\VatCalculatorServiceProvider[publishes,loadTranslationsFrom,registerRoutes]', + $sp = m::mock('Consilience\VatCalculator\VatCalculatorServiceProvider[publishes,loadTranslationsFrom,registerRoutes]', [$app] ); $sp->shouldAllowMockingProtectedMethods(); @@ -74,7 +74,7 @@ public function testShouldBoot() public function testShouldRegister() { - $sp = m::mock('Sprocketbox\VatCalculator\VatCalculatorServiceProvider[mergeConfig,registerVatCalculator,registerFacade]', + $sp = m::mock('Consilience\VatCalculator\VatCalculatorServiceProvider[mergeConfig,registerVatCalculator,registerFacade]', ['something'] ); $sp->shouldAllowMockingProtectedMethods(); @@ -88,7 +88,7 @@ public function testShouldRegister() public function testShouldMergeConfig() { $test = $this; - $sp = m::mock('Sprocketbox\VatCalculator\VatCalculatorServiceProvider', ['app']) + $sp = m::mock('Consilience\VatCalculator\VatCalculatorServiceProvider', ['app']) ->shouldDeferMissing() ->shouldAllowMockingProtectedMethods(); @@ -107,7 +107,7 @@ public function testShouldRegisterFacade() ->once() ->with(m::type('callable')); - $sp = m::mock('Sprocketbox\VatCalculator\VatCalculatorServiceProvider', [$app]) + $sp = m::mock('Consilience\VatCalculator\VatCalculatorServiceProvider', [$app]) ->shouldDeferMissing(); $sp->registerFacade(); } diff --git a/tests/VatCalculatorTest.php b/tests/VatCalculatorTest.php index ec0107c..84cd518 100644 --- a/tests/VatCalculatorTest.php +++ b/tests/VatCalculatorTest.php @@ -1,6 +1,6 @@ setExpectedException(\Sprocketbox\VatCalculator\Exceptions\VATCheckUnavailableException::class); + $this->setExpectedException(\Consilience\VatCalculator\Exceptions\VATCheckUnavailableException::class); $vatCheck = $this->getMockFromWsdl(__DIR__.'/checkVatService.wsdl', 'VATService'); $vatCheck->expects($this->any()) ->method('checkVat') @@ -471,7 +471,7 @@ public function testValidateVATNumberThrowsExceptionOnSoapFailure() public function testCannotValidateVATNumberWhenServiceIsDown() { - $this->setExpectedException(\Sprocketbox\VatCalculator\Exceptions\VATCheckUnavailableException::class); + $this->setExpectedException(\Consilience\VatCalculator\Exceptions\VATCheckUnavailableException::class); $result = new \stdClass(); $result->valid = false; diff --git a/tests/VatCalculatorValidatorExtensionTest.php b/tests/VatCalculatorValidatorExtensionTest.php index 2c859a0..3d7d2ca 100644 --- a/tests/VatCalculatorValidatorExtensionTest.php +++ b/tests/VatCalculatorValidatorExtensionTest.php @@ -1,12 +1,12 @@