Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
amranidev authored and StyleCIBot committed Sep 6, 2018
1 parent d99741b commit e26b386
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 72 deletions.
14 changes: 7 additions & 7 deletions config/laracombee.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],

/*
Expand All @@ -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',
],
];
108 changes: 54 additions & 54 deletions src/AbstractRecombee.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -49,15 +49,15 @@ public function __construct()
/**
* Add new item to recombee.
*
* @param int $item_id
* @param int $item_id
* @param array $fileds
*
* @return mixed
*/
public function addItem($item_id, $fields)
{
$item = new SetItemValues($item_id, $fields, [
"cascadeCreate" => true,
'cascadeCreate' => true,
]);

$item->setTimeout($this->timeout);
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -320,25 +320,25 @@ 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;
}

/**
* 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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/Commands/DefineUserProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class DefineUserProperties extends Command
{

/**
* The name and signature of the console command.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/DeleteItemProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ public function handle()

$bar->finish();
$this->line('');
$this->info("Delelted Successfully!");
$this->info('Delelted Successfully!');
}
}
3 changes: 1 addition & 2 deletions src/Commands/DeleteUserProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class DeleteUserProperties extends Command
{

/**
* The name and signature of the console command.
*
Expand Down Expand Up @@ -59,6 +58,6 @@ public function handle()

$bar->finish();
$this->line('');
$this->info("Delelted Successfully!");
$this->info('Delelted Successfully!');
}
}
4 changes: 0 additions & 4 deletions src/Laracombee.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 2 additions & 3 deletions src/Providers/LaracombeeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'), ]);
}
}

0 comments on commit e26b386

Please sign in to comment.