diff --git a/config/laracombee.php b/config/laracombee.php index e2d67bb..cb918a3 100644 --- a/config/laracombee.php +++ b/config/laracombee.php @@ -23,14 +23,14 @@ | | Here where you can define the item properties in the recombee database. | - | Value type of the user property to be created. One of: + | Value type of the user property to be created. One of: | int, double, string, boolean, timestamp, set, image or imageList. | */ 'user-properties' => [ - "name" => "string", - "age" => "boolean", + 'name' => 'string', + 'age' => 'boolean', ], /* @@ -40,13 +40,13 @@ | | Here where you can define the item properties in the recombee database. | - | Value type of the item property to be created. One of: + | Value type of the item property to be created. One of: | int, double, string, boolean, timestamp, set, image or imageList. | */ 'item-properties' => [ - "item-name" => "string", - "price" => "int", - ] + 'item-name' => 'string', + 'price' => 'int', + ], ]; diff --git a/src/AbstractRecombee.php b/src/AbstractRecombee.php index f460c93..c70ca1e 100644 --- a/src/AbstractRecombee.php +++ b/src/AbstractRecombee.php @@ -3,27 +3,27 @@ namespace Amranidev\Laracombee; use Recombee\RecommApi\Client; +use Recombee\RecommApi\Requests\AddBookmark; +use Recombee\RecommApi\Requests\AddCartAddition; +use Recombee\RecommApi\Requests\AddDetailedView; +use Recombee\RecommApi\Requests\AddItemProperty; +use Recombee\RecommApi\Requests\AddPurchase; +use Recombee\RecommApi\Requests\AddRating; use Recombee\RecommApi\Requests\AddUser; +use Recombee\RecommApi\Requests\AddUserProperty; +use Recombee\RecommApi\Requests\DeleteBookmark; +use Recombee\RecommApi\Requests\DeleteCartAddition; use Recombee\RecommApi\Requests\DeleteItem; +use Recombee\RecommApi\Requests\DeleteItemProperty; +use Recombee\RecommApi\Requests\DeleteItemView; +use Recombee\RecommApi\Requests\DeletePurchase; use Recombee\RecommApi\Requests\DeleteUser; +use Recombee\RecommApi\Requests\DeleteUserProperty; use Recombee\RecommApi\Requests\ListUsers; use Recombee\RecommApi\Requests\MergeUsers; use Recombee\RecommApi\Requests\RecommendItemsToUser; use Recombee\RecommApi\Requests\SetItemValues; use Recombee\RecommApi\Requests\SetUserValues; -use Recombee\RecommApi\Requests\AddUserProperty; -use Recombee\RecommApi\Requests\AddItemProperty; -use Recombee\RecommApi\Requests\DeleteUserProperty; -use Recombee\RecommApi\Requests\DeleteItemProperty; -use Recombee\RecommApi\Requests\AddDetailedView; -use Recombee\RecommApi\Requests\DeleteItemView; -use Recombee\RecommApi\Requests\AddPurchase; -use Recombee\RecommApi\Requests\DeletePurchase; -use Recombee\RecommApi\Requests\AddRating; -use Recombee\RecommApi\Requests\AddCartAddition; -use Recombee\RecommApi\Requests\DeleteCartAddition; -use Recombee\RecommApi\Requests\AddBookmark; -use Recombee\RecommApi\Requests\DeleteBookmark; class AbstractRecombee { @@ -49,7 +49,7 @@ public function __construct() /** * Add new item to recombee. * - * @param int $item_id + * @param int $item_id * @param array $fileds * * @return mixed @@ -57,7 +57,7 @@ public function __construct() public function addItem($item_id, $fields) { $item = new SetItemValues($item_id, $fields, [ - "cascadeCreate" => true, + 'cascadeCreate' => true, ]); $item->setTimeout($this->timeout); @@ -70,8 +70,8 @@ public function addItem($item_id, $fields) /** * Get recommended items. * - * @param int $user_id - * @param int $limit + * @param int $user_id + * @param int $limit * @param array $filters * * @return mixed @@ -88,7 +88,7 @@ public function recommendItemsToUser($user_id, $limit, $filters) /** * Update item. * - * @param int $item_id + * @param int $item_id * @param array $fileds * * @return mixed @@ -151,8 +151,8 @@ public function deleteUser($user_id) /** * Merge users. * - * @param int $target_user_id - * @param int $source_user_id + * @param int $target_user_id + * @param int $source_user_id * @param array $params * * @return mixed @@ -197,7 +197,7 @@ public function setUserValues(int $user_id, array $fileds) */ public function addUserProperty($property, $type) { - $userProps = new AddUserProperty($property, $type); + $userProps = new AddUserProperty($property, $type); $client->send($userProps); @@ -206,7 +206,7 @@ public function addUserProperty($property, $type) public function deleteUserProperty($property, $type) { - $userProps = new DeleteUserProperty($property, $type); + $userProps = new DeleteUserProperty($property, $type); $client->send($userProps); @@ -239,9 +239,9 @@ public function deleteItemProperty($property, $type) /** * Add Detailed View. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function addDetailedView($user_id, $item_id, $options) @@ -255,9 +255,9 @@ public function addDetailedView($user_id, $item_id, $options) /** * Delete Item View. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function deleteItemView($user_id, $item_id, $options) @@ -271,9 +271,9 @@ public function deleteItemView($user_id, $item_id, $options) /** * Add Purchase. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function addPurchase($user_id, $item_id, $options) @@ -287,9 +287,9 @@ public function addPurchase($user_id, $item_id, $options) /** * Delete Purchase. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function deletePurchase($user_id, $item_id, $options) @@ -303,10 +303,10 @@ public function deletePurchase($user_id, $item_id, $options) /** * Add rating. - * - * @param int $user_id - * @param int $item_id - * @param int $rating + * + * @param int $user_id + * @param int $item_id + * @param int $rating * @param array $options */ public function addRating($user_id, $item_id, $rating, $options) @@ -320,15 +320,15 @@ public function addRating($user_id, $item_id, $rating, $options) /** * Delete rating. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function deleteRating($user_id, $item_id, $options) { $rating = new DeleteRating($user_id, $item_id, $options); - + $this->client->send($rating); return true; @@ -336,9 +336,9 @@ public function deleteRating($user_id, $item_id, $options) /** * Card Addtion. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function addCartAddition($user_id, $item_id, $options) @@ -352,9 +352,9 @@ public function addCartAddition($user_id, $item_id, $options) /** * Delete Card Addtion. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function deleteCartAddition($user_id, $item_id, $options) @@ -368,9 +368,9 @@ public function deleteCartAddition($user_id, $item_id, $options) /** * Add Bookmark. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function addBookmark($user_id, $item_id, $options) @@ -384,9 +384,9 @@ public function addBookmark($user_id, $item_id, $options) /** * Delete Bookmark. - * - * @param int $user_id - * @param int $item_id + * + * @param int $user_id + * @param int $item_id * @param array $options */ public function deleteBookmark($user_id, $item_id, $options) diff --git a/src/Commands/DefineUserProperties.php b/src/Commands/DefineUserProperties.php index 1c8e71e..1b11400 100644 --- a/src/Commands/DefineUserProperties.php +++ b/src/Commands/DefineUserProperties.php @@ -8,7 +8,6 @@ class DefineUserProperties extends Command { - /** * The name and signature of the console command. * diff --git a/src/Commands/DeleteItemProperties.php b/src/Commands/DeleteItemProperties.php index b7f5eaa..1c1cc00 100644 --- a/src/Commands/DeleteItemProperties.php +++ b/src/Commands/DeleteItemProperties.php @@ -58,6 +58,6 @@ public function handle() $bar->finish(); $this->line(''); - $this->info("Delelted Successfully!"); + $this->info('Delelted Successfully!'); } } diff --git a/src/Commands/DeleteUserProperties.php b/src/Commands/DeleteUserProperties.php index af0be68..d765b76 100644 --- a/src/Commands/DeleteUserProperties.php +++ b/src/Commands/DeleteUserProperties.php @@ -8,7 +8,6 @@ class DeleteUserProperties extends Command { - /** * The name and signature of the console command. * @@ -59,6 +58,6 @@ public function handle() $bar->finish(); $this->line(''); - $this->info("Delelted Successfully!"); + $this->info('Delelted Successfully!'); } } diff --git a/src/Laracombee.php b/src/Laracombee.php index 5e5e490..b57c347 100644 --- a/src/Laracombee.php +++ b/src/Laracombee.php @@ -2,10 +2,6 @@ namespace Amranidev\Laracombee; -use Amranidev\Laracombee\AbstractRecombee; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Foundation\Auth\User; - class Laracombee extends AbstractRecombee { public function __construct() diff --git a/src/Providers/LaracombeeServiceProvider.php b/src/Providers/LaracombeeServiceProvider.php index 607005d..5d9ae87 100644 --- a/src/Providers/LaracombeeServiceProvider.php +++ b/src/Providers/LaracombeeServiceProvider.php @@ -30,13 +30,12 @@ public function register() DeleteItemProperties::class, ] ); - } public function boot() { - $configPath = __DIR__ . '/../config/laracombee.php'; + $configPath = __DIR__.'/../config/laracombee.php'; $this->publishes([ - $configPath => config_path('laracombee.php')]); + $configPath => config_path('laracombee.php'), ]); } }