@@ -21,7 +21,7 @@ |
||
21 | 21 | public function selectOneByShopIdAndId($shopId, $sendingMethodId) |
22 | 22 | { |
23 | 23 | return $this->model->with( |
24 | - array('relatedPaymentMethods' => function ($query) { |
|
24 | + array('relatedPaymentMethods' => function($query) { |
|
25 | 25 | $query->where('active', '=', 1); |
26 | 26 | }) |
27 | 27 | )->where('shop_id', '=', $shopId)->where('active', '=', 1) |
@@ -11,13 +11,13 @@ |
||
11 | 11 | |
12 | 12 | class BrandService extends BaseService |
13 | 13 | { |
14 | - public function __construct(BrandRepository $brand) |
|
15 | - { |
|
16 | - $this->repo = $brand; |
|
14 | + public function __construct(BrandRepository $brand) |
|
15 | + { |
|
16 | + $this->repo = $brand; |
|
17 | 17 | $this->storageImagePath = storage_path() .config('hideyo.storage_path'). "/brand/"; |
18 | 18 | $this->publicImagePath = public_path() .config('hideyo.public_path'). "/brand/"; |
19 | 19 | |
20 | - } |
|
20 | + } |
|
21 | 21 | |
22 | 22 | |
23 | 23 | /** |
@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | public function __construct(BrandRepository $brand) |
15 | 15 | { |
16 | 16 | $this->repo = $brand; |
17 | - $this->storageImagePath = storage_path() .config('hideyo.storage_path'). "/brand/"; |
|
18 | - $this->publicImagePath = public_path() .config('hideyo.public_path'). "/brand/"; |
|
17 | + $this->storageImagePath = storage_path().config('hideyo.storage_path')."/brand/"; |
|
18 | + $this->publicImagePath = public_path().config('hideyo.public_path')."/brand/"; |
|
19 | 19 | |
20 | 20 | } |
21 | 21 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | ); |
43 | 43 | |
44 | 44 | if ($brandId) { |
45 | - $rules['title'] = $rules['title'].', '.$brandId.' = id'; |
|
45 | + $rules['title'] = $rules['title'].', '.$brandId.' = id'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | return $rules; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $attributes['extension'] = $attributes['file']->getClientOriginalExtension(); |
91 | 91 | $attributes['size'] = $attributes['file']->getSize(); |
92 | 92 | |
93 | - $filename = str_replace(" ", "_", strtolower($attributes['file']->getClientOriginalName())); |
|
93 | + $filename = str_replace(" ", "_", strtolower($attributes['file']->getClientOriginalName())); |
|
94 | 94 | $uploadSuccess = $attributes['file']->move($destinationPath, $filename); |
95 | 95 | |
96 | 96 | if ($uploadSuccess) { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $this->model = $this->find($brandId); |
142 | 142 | |
143 | - if($this->model) { |
|
143 | + if ($this->model) { |
|
144 | 144 | $attributes['modified_by_user_id'] = auth('hideyobackend')->user()->id; |
145 | 145 | $image = $this->findImage($imageId); |
146 | 146 | $image->fill($attributes); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | { |
203 | 203 | $result = $this->repo->getModelImage()->get(); |
204 | 204 | $shop = ShopService::find($shopId); |
205 | - if($result AND $shop->thumbnail_square_sizes) { |
|
205 | + if ($result AND $shop->thumbnail_square_sizes) { |
|
206 | 206 | foreach ($result as $productImage) { |
207 | 207 | if ($shop->thumbnail_square_sizes) { |
208 | 208 | $sizes = explode(',', $shop->thumbnail_square_sizes); |
@@ -13,8 +13,8 @@ |
||
13 | 13 | */ |
14 | 14 | protected $table = 'brand_image'; |
15 | 15 | |
16 | - protected $guarded = array('file'); |
|
16 | + protected $guarded = array('file'); |
|
17 | 17 | |
18 | 18 | // Add the 'avatar' attachment to the fillable array so that it's mass-assignable on this model. |
19 | - protected $fillable = ['brand_id', 'file', 'extension', 'size', 'path', 'rank', 'tag', 'modified_by_user_id',]; |
|
19 | + protected $fillable = ['brand_id', 'file', 'extension', 'size', 'path', 'rank', 'tag', 'modified_by_user_id', ]; |
|
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -22,8 +22,8 @@ |
||
22 | 22 | $this->model = $model; |
23 | 23 | $this->modelImage = $modelImage; |
24 | 24 | $this->redirect = $redirect; |
25 | - $this->storageImagePath = storage_path() .config('hideyo.storage_path'). "/brand/"; |
|
26 | - $this->publicImagePath = public_path() .config('hideyo.public_path'). "/brand/"; |
|
25 | + $this->storageImagePath = storage_path().config('hideyo.storage_path')."/brand/"; |
|
26 | + $this->publicImagePath = public_path().config('hideyo.public_path')."/brand/"; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | protected $scoped = array('shop_id'); |
21 | 21 | |
22 | 22 | // Add the 'avatar' attachment to the fillable array so that it's mass-assignable on this model. |
23 | - protected $fillable = ['active', 'title', 'short_description', 'description', 'rank', 'meta_title', 'meta_description', 'meta_keywords', 'shop_id', 'modified_by_user_id']; |
|
23 | + protected $fillable = ['active', 'title', 'short_description', 'description', 'rank', 'meta_title', 'meta_description', 'meta_keywords', 'shop_id', 'modified_by_user_id']; |
|
24 | 24 | |
25 | 25 | public function sluggable() |
26 | 26 | { |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | |
10 | 10 | class FaqService extends BaseService |
11 | 11 | { |
12 | - public function __construct(FaqItemRepository $faq) |
|
13 | - { |
|
14 | - $this->repo = $faq; |
|
15 | - } |
|
12 | + public function __construct(FaqItemRepository $faq) |
|
13 | + { |
|
14 | + $this->repo = $faq; |
|
15 | + } |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * The validation rules for the model. |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | public function selectAllGroups() |
71 | 71 | { |
72 | - return $this->repo->selectAllGroups(); |
|
72 | + return $this->repo->selectAllGroups(); |
|
73 | 73 | |
74 | 74 | } |
75 | 75 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | ); |
33 | 33 | |
34 | 34 | if ($faqItemId) { |
35 | - $rules['question'] = 'required|between:4,65|unique:'.$this->repo->getModel()->getTable().',question,'.$faqItemId; |
|
35 | + $rules['question'] = 'required|between:4,65|unique:'.$this->repo->getModel()->getTable().',question,'.$faqItemId; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | function selectAllActiveByShopId($shopId) |
35 | 35 | { |
36 | - return $this->model->where('shop_id', '=', $shopId)->get(); |
|
36 | + return $this->model->where('shop_id', '=', $shopId)->get(); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | } |
@@ -9,10 +9,10 @@ |
||
9 | 9 | |
10 | 10 | class UserService extends BaseService |
11 | 11 | { |
12 | - public function __construct(UserRepository $user) |
|
13 | - { |
|
14 | - $this->repo = $user; |
|
15 | - } |
|
12 | + public function __construct(UserRepository $user) |
|
13 | + { |
|
14 | + $this->repo = $user; |
|
15 | + } |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * The validation rules for the model. |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | ); |
29 | 29 | |
30 | 30 | if ($userId) { |
31 | - $rules['email'] = $rules['email'].', '.$userId.' = id'; |
|
32 | - $rules['username'] = $rules['email'].', '.$userId.' = id'; |
|
31 | + $rules['email'] = $rules['email'].', '.$userId.' = id'; |
|
32 | + $rules['username'] = $rules['email'].', '.$userId.' = id'; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | return $rules; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | $model = $this->find($userId); |
49 | - $attributes['password']= Hash::make(array_get($attributes, 'password')); |
|
49 | + $attributes['password'] = Hash::make(array_get($attributes, 'password')); |
|
50 | 50 | return $this->updateOrAddModel($model, $attributes); |
51 | 51 | } |
52 | 52 | |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | $attributes['password'] = Hash::make(array_get($attributes, 'password')); |
72 | 72 | $attributes['confirmed'] = 0; |
73 | 73 | |
74 | - $attributes['confirmation_code'] = md5(uniqid(mt_rand(), true)); |
|
74 | + $attributes['confirmation_code'] = md5(uniqid(mt_rand(), true)); |
|
75 | 75 | |
76 | - $model = $this->updateOrAddModel($this->repo->getModel(), $attributes); |
|
76 | + $model = $this->updateOrAddModel($this->repo->getModel(), $attributes); |
|
77 | 77 | |
78 | 78 | if ($model) { |
79 | 79 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | config()->get('confide::email_queue'), |
84 | 84 | config()->get('confide::email_account_confirmation'), |
85 | 85 | compact('user'), |
86 | - function ($message) use ($user) { |
|
86 | + function($message) use ($user) { |
|
87 | 87 | $message |
88 | 88 | ->to($user->email, $user->username) |
89 | 89 | ->subject(Lang::get('confide::confide.email.account_confirmation.subject')); |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | if (count($attributes) > 0) { |
123 | 123 | $this->model->username = array_get($attributes, 'username'); |
124 | 124 | |
125 | - $this->model->selected_shop_id = array_get($attributes, 'selected_shop_id'); |
|
125 | + $this->model->selected_shop_id = array_get($attributes, 'selected_shop_id'); |
|
126 | 126 | $this->model->email = array_get($attributes, 'email'); |
127 | - $this->model->language_id = array_get($attributes, 'language_id'); |
|
127 | + $this->model->language_id = array_get($attributes, 'language_id'); |
|
128 | 128 | $this->model->save(); |
129 | 129 | |
130 | 130 | return $this->model; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function login($input) |
142 | 142 | { |
143 | - if (! isset($input['password'])) { |
|
143 | + if (!isset($input['password'])) { |
|
144 | 144 | $input['password'] = null; |
145 | 145 | } |
146 | 146 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $user->password |
179 | 179 | ); |
180 | 180 | |
181 | - return (! $user->confirmed && $correctPassword); |
|
181 | + return (!$user->confirmed && $correctPassword); |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 |
@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | |
13 | 13 | class ClientService extends BaseService |
14 | 14 | { |
15 | - public function __construct(ClientRepository $client, ClientAddressRepository $clientAddress) |
|
16 | - { |
|
17 | - $this->repo = $client; |
|
18 | - $this->repoAddress = $clientAddress; |
|
19 | - } |
|
15 | + public function __construct(ClientRepository $client, ClientAddressRepository $clientAddress) |
|
16 | + { |
|
17 | + $this->repo = $client; |
|
18 | + $this->repoAddress = $clientAddress; |
|
19 | + } |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * The validation rules for the model. |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | |
98 | 98 | public function validateConfirmationCode($confirmationCode, $email, $shopId) |
99 | 99 | { |
100 | - return $this->repo->validateConfirmationCodeByConfirmationCodeAndEmail($confirmationCode, $email, $shopId); |
|
101 | - } |
|
100 | + return $this->repo->validateConfirmationCodeByConfirmationCodeAndEmail($confirmationCode, $email, $shopId); |
|
101 | + } |
|
102 | 102 | |
103 | 103 | public function validateLogin($attributes) |
104 | 104 | { |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | $client = $this->repo->checkEmailByShopId($attributes['email'], $shopId); |
167 | 167 | |
168 | 168 | if($client AND $client->account_created) { |
169 | - return false; |
|
169 | + return false; |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | if($client) { |
173 | - $model = $client; |
|
173 | + $model = $client; |
|
174 | 174 | } else { |
175 | - $model = $this->repo->getModel(); |
|
175 | + $model = $this->repo->getModel(); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | $attributes['shop_id'] = $shopId; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | public function createAddress($attributes, $clientId) |
206 | 206 | { |
207 | 207 | $attributes['client_id'] = $clientId; |
208 | - $model = $this->repoAddress->getModel(); |
|
208 | + $model = $this->repoAddress->getModel(); |
|
209 | 209 | $model->fill($attributes); |
210 | 210 | $model->save(); |
211 | 211 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | |
48 | 48 | if ($clientId) { |
49 | - $rules['email'] = 'required|email|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$clientId.' = id'; |
|
49 | + $rules['email'] = 'required|email|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$clientId.' = id'; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | return $rules; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | // create the validation rules ------------------------ |
148 | 148 | $rules = array( |
149 | - 'email' => 'required|email', // required and must be unique in the ducks table |
|
149 | + 'email' => 'required|email', // required and must be unique in the ducks table |
|
150 | 150 | 'password' => 'required', |
151 | 151 | 'firstname' => 'required', |
152 | 152 | 'lastname' => 'required', |
@@ -165,11 +165,11 @@ discard block |
||
165 | 165 | { |
166 | 166 | $client = $this->repo->checkEmailByShopId($attributes['email'], $shopId); |
167 | 167 | |
168 | - if($client AND $client->account_created) { |
|
168 | + if ($client AND $client->account_created) { |
|
169 | 169 | return false; |
170 | 170 | } |
171 | 171 | |
172 | - if($client) { |
|
172 | + if ($client) { |
|
173 | 173 | $model = $client; |
174 | 174 | } else { |
175 | 175 | $model = $this->repo->getModel(); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $attributes['active'] = 0; |
181 | 181 | $attributes['confirmed'] = 0; |
182 | 182 | $attributes['confirmation_code'] = md5(uniqid(mt_rand(), true)); |
183 | - if($accountConfirmed) { |
|
183 | + if ($accountConfirmed) { |
|
184 | 184 | $attributes['active'] = 1; |
185 | 185 | $attributes['confirmed'] = 1; |
186 | 186 | $attributes['confirmation_code'] = null; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | $clientAddress = $this->repoAddress->find($addressId); |
219 | 219 | |
220 | - if($clientAddress) { |
|
220 | + if ($clientAddress) { |
|
221 | 221 | $clientAddress->fill($attributes); |
222 | 222 | $clientAddress->save(); |
223 | 223 |