Skip to content

Commit

Permalink
Apply fixes from StyleCI (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson authored Jun 12, 2020
1 parent 10d1490 commit e8a332c
Show file tree
Hide file tree
Showing 149 changed files with 272 additions and 295 deletions.
2 changes: 1 addition & 1 deletion src/Core/Addresses/Models/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Address extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'user';
Expand Down
8 changes: 4 additions & 4 deletions src/Core/Assets/Drivers/BaseUrlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function process(array $data, Model $model = null)

/**
* Prepares the asset.
*
*
* @param array $data
* @param \Illuminate\Database\Eloquent\Model $model
* @return \GetCandy\Api\Core\Assets\Models\Asset
Expand All @@ -104,7 +104,7 @@ protected function prepare()

/**
* Generates a hashed name.
*
*
* @return string
*/
public function hashName()
Expand All @@ -114,7 +114,7 @@ public function hashName()

/**
* Get the thumbnail for the video.
*
*
* @return null|\Intervention\Image\Image
*/
public function getThumbnail()
Expand All @@ -126,7 +126,7 @@ public function getThumbnail()

/**
* Gets an image from a given url.
*
*
* @param string $url
* @return null|Intervention\Image\Image
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Assets/Models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Asset extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'main';
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Assets/Models/AssetSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AssetSource extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'assets';
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Assets/Models/AssetTransform.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AssetTransform extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'main';
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Assets/Models/Transform.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Transform extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'assets';
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Assets/Services/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct()

/**
* Gets the driver for the upload.
*
*
* @param string $mimeType
* @return mixed
*/
Expand All @@ -30,7 +30,7 @@ public function getDriver($mimeType)

/**
* Uploads an asset.
*
*
* @param array $data
* @param null|\Illuminate\Database\Eloquent\Model $model
* @param int $position
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Associations/Models/AssociationGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AssociationGroup extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'main';
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Attributes/Models/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Attribute extends BaseModel

/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'attribute';
Expand Down Expand Up @@ -48,7 +48,7 @@ public function attributables()

/**
* Sets the name attribute to a json string.
*
*
* @param array $value
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Attributes/Models/AttributeGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AttributeGroup extends BaseModel

/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'attribute_group';
Expand All @@ -28,7 +28,7 @@ class AttributeGroup extends BaseModel

/**
* Get the attributes associated to the group.
*
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function attributes()
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Attributes/Services/AttributeGroupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function all($includes = null)

/**
* Returns model by a given hashed id.
*
*
* @param string $id
* @param null|array|string $includes
* @return \GetCandy\Api\Core\Attributes\Models\AttributeGroup
Expand Down Expand Up @@ -102,7 +102,7 @@ public function update($hashedId, array $data)

/**
* Updates the positions of attribute groups.
*
*
* @param array $data
* @return bool
*
Expand Down
8 changes: 4 additions & 4 deletions src/Core/Attributes/Services/AttributeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getHandles()

/**
* Updates the positions of attributes.
*
*
* @param array $data
* @return bool
*
Expand Down Expand Up @@ -177,7 +177,7 @@ public function getByHashedId($id, $includes = null)

/**
* Returns attributes for a group.
*
*
* @param string $groupId
* @return \Illuminate\Database\Eloquent\Collection
*/
Expand Down Expand Up @@ -207,7 +207,7 @@ public function reorder(array $data)

/**
* Gets the last attribute for a group.
*
*
* @param string $groupId
* @return null|\GetCandy\Api\Core\Attributes\Models\Attribute
*/
Expand All @@ -218,7 +218,7 @@ public function getLastItem($groupId)

/**
* Checks whether a attribute name exists in a group.
*
*
* @param string $value
* @param string $groupId
* @param null|string $attributeId
Expand Down
3 changes: 1 addition & 2 deletions src/Core/Auth/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use GetCandy\Api\Core\Traits\Hashids;
use GetCandy\Api\Core\Users\Models\UserDetail;
use GetCandy\Plugins\LegacyPassword\Models\LegacyPassword;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;
Expand All @@ -23,7 +22,7 @@ class User extends Authenticatable

/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'user';
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Auth/Services/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function getByEmail($email)

/**
* Gets paginated data for the record.
*
*
* @param int $length
* @param null|int $page
* @param null|string $keywords
Expand Down
1 change: 0 additions & 1 deletion src/Core/Baskets/Events/BasketFetchedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace GetCandy\Api\Core\Baskets\Events;

use GetCandy\Api\Core\Baskets\Models\Basket;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
Expand Down
1 change: 0 additions & 1 deletion src/Core/Baskets/Events/BasketStoredEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace GetCandy\Api\Core\Baskets\Events;

use GetCandy\Api\Core\Baskets\Models\Basket;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
Expand Down
3 changes: 1 addition & 2 deletions src/Core/Baskets/Models/Basket.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
use GetCandy\Api\Core\Scaffold\BaseModel;
use GetCandy\Api\Core\Traits\HasCompletion;
use GetCandy\Api\Core\Traits\HasMeta;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Basket extends BaseModel
{
use HasCompletion, HasMeta;

/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'basket';
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Baskets/Models/BasketLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BasketLine extends BaseModel

/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'basket';
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Baskets/Models/SavedBasket.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SavedBasket extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'main';
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Categories/Drafting/CategoryDrafter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace GetCandy\Api\Core\Categories\Drafting;

use DB;
use Versioning;
use Illuminate\Database\Eloquent\Model;
use GetCandy\Api\Core\Drafting\BaseDrafter;
use GetCandy\Api\Core\Search\SearchContract;
use GetCandy\Api\Core\Events\ModelPublishedEvent;
use GetCandy\Api\Core\Search\SearchContract;
use Illuminate\Database\Eloquent\Model;
use NeonDigital\Drafting\Interfaces\DrafterInterface;
use Versioning;

class CategoryDrafter extends BaseDrafter implements DrafterInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/Core/Categories/Events/CategoryStoredEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace GetCandy\Api\Core\Categories\Events;

use GetCandy\Api\Core\Categories\Models\Category;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
Expand Down
10 changes: 5 additions & 5 deletions src/Core/Categories/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Category extends BaseModel

/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'main';
Expand All @@ -44,7 +44,7 @@ class Category extends BaseModel
* The attributes that are mass assignable.
*
* @var array
*/
*/
protected $fillable = [
'attribute_data', 'parent_id',
];
Expand Down Expand Up @@ -101,7 +101,7 @@ public function newUnscopedQuery($table = null)
*
* @param int $value
* @return void
*
*
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
*/
public function setParentIdAttribute($value)
Expand Down Expand Up @@ -135,7 +135,7 @@ public function newNestedSetQuery($table = null)

/**
* Call pending action.
*
*
* @return void
*/
protected function callPendingAction()
Expand Down Expand Up @@ -192,7 +192,7 @@ protected function deleteDescendants()
* We use our own QueryBuilder here as withDepth was causing
* a serious query issue when looking through category channels.
* @since 2.0
*
*
* @return \GetCandy\Api\Core\Categories\QueryBuilder
*/
public function newEloquentBuilder($query)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Categories/Services/CategoryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public function __construct()

/**
* Returns model by a given hashed id.
*
*
* @param string $id
* @return \GetCandy\Api\Core\Categories\Models\Category
*
*
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
*/
public function getByHashedId($id)
Expand Down Expand Up @@ -290,7 +290,7 @@ public function getCategoryTree($channel = null, $depth = 1, $includes = null)
*
* @param string $id
* @return bool
*
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
public function delete($id)
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Channels/Models/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Channel extends BaseModel
{
/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'channel';
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Collections/Models/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Collection extends BaseModel

/**
* The Hashid connection name for enconding the id.
*
*
* @var string
*/
protected $hashids = 'main';
Expand Down
Loading

0 comments on commit e8a332c

Please sign in to comment.