From d5480cf18b44a3da49c1d1a7cb50f50115d51c30 Mon Sep 17 00:00:00 2001 From: Percy Mamedy Date: Sat, 5 Nov 2016 11:00:48 +0400 Subject: [PATCH 1/2] Added support for Laravel 5.3 --- .styleci.yml | 7 +++++++ composer.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .styleci.yml diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 0000000..c3044f0 --- /dev/null +++ b/.styleci.yml @@ -0,0 +1,7 @@ +preset: laravel + +disabled: + - concat_without_spaces + +enabled: + - concat_with_spaces diff --git a/composer.json b/composer.json index 4002c8a..f519ef9 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "require": { "php": ">=5.5.0", - "laravel/framework": "5.0.*|5.1.*|5.2.*", + "laravel/framework": "5.0 - 5.3", "findbrok/php-watson-api-bridge": "1.0.*" }, "require-dev": { From 1572b3126deb17f18cdc098f5ac79501e92aec86 Mon Sep 17 00:00:00 2001 From: Percy Mamedy Date: Sat, 5 Nov 2016 07:04:01 +0000 Subject: [PATCH 2/2] Applied fixes from StyleCI --- src/AbstractTranslator.php | 2 +- src/Translator.php | 2 +- src/WatsonTranslateServiceProvider.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AbstractTranslator.php b/src/AbstractTranslator.php index 7c0fcfe..bd352e0 100644 --- a/src/AbstractTranslator.php +++ b/src/AbstractTranslator.php @@ -166,7 +166,7 @@ public function usingModel($modelName = '') //Set the model id $this->modelId = ($modelName == '') ? config('watson-translate.models.default') : - config('watson-translate.models.'.$modelName); + config('watson-translate.models.' . $modelName); //return the translator return $this; } diff --git a/src/Translator.php b/src/Translator.php index 19ae033..63abac4 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -125,7 +125,7 @@ public function getModelDetails() { //Send request to Watson $this->results = $this->makeBridge() - ->get('v2/models/'.$this->getModelId()) + ->get('v2/models/' . $this->getModelId()) ->getBody() ->getContents(); //Return translator object diff --git a/src/WatsonTranslateServiceProvider.php b/src/WatsonTranslateServiceProvider.php index eb40a7b..8725d50 100644 --- a/src/WatsonTranslateServiceProvider.php +++ b/src/WatsonTranslateServiceProvider.php @@ -31,7 +31,7 @@ public function boot() { //Publish config file $this->publishes([ - __DIR__.'/config/watson-translate.php' => config_path('watson-translate.php'), + __DIR__ . '/config/watson-translate.php' => config_path('watson-translate.php'), ], 'config'); } @@ -43,7 +43,7 @@ public function boot() public function register() { //Merge config file - $this->mergeConfigFrom(__DIR__.'/config/watson-translate.php', 'watson-translate'); + $this->mergeConfigFrom(__DIR__ . '/config/watson-translate.php', 'watson-translate'); //Register Bindings $this->registerBinding(); //Add Facades to the Translator service