Passed
Push — master ( 479ffa...005cbc )
by Matthijs
01:42
created
src/Services/Coupon/CouponService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
         );
31 31
         
32 32
         if ($couponId) {
33
-            $rules['title'] =   'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$couponId.' = id';
34
-            $rules['code'] =   'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$couponId.' = id';
33
+            $rules['title'] = 'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$couponId.' = id';
34
+            $rules['code'] = 'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$couponId.' = id';
35 35
         }
36 36
 
37 37
         return $rules;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         );
45 45
         
46 46
         if ($groupId) {
47
-            $rules['title'] =   'required|between:4,65|unique_with:'.$this->repo->getGroupModel()->getTable().', shop_id, '.$groupId.' = id';
47
+            $rules['title'] = 'required|between:4,65|unique_with:'.$this->repo->getGroupModel()->getTable().', shop_id, '.$groupId.' = id';
48 48
         }
49 49
 
50 50
         return $rules;
Please login to merge, or discard this patch.
src/Services/BaseService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     {
40 40
         if (isset($result->id)) {
41 41
             Notification::success($successMsg);
42
-            if(is_array($routeName)) {
42
+            if (is_array($routeName)) {
43 43
                 return redirect()->route($routeName[0], $routeName[1]);
44 44
             }
45 45
             return redirect()->route($routeName);   
Please login to merge, or discard this patch.
src/Services/Brand/BrandService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
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
     /**
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         );
41 41
         
42 42
         if ($brandId) {
43
-            $rules['title'] =   $rules['title'].', '.$brandId.' = id';
43
+            $rules['title'] = $rules['title'].', '.$brandId.' = id';
44 44
         }
45 45
      
46 46
         return $rules;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $attributes['extension'] = $attributes['file']->getClientOriginalExtension();
89 89
         $attributes['size'] = $attributes['file']->getSize();
90 90
 
91
-        $filename =  str_replace(" ", "_", strtolower($attributes['file']->getClientOriginalName()));
91
+        $filename = str_replace(" ", "_", strtolower($attributes['file']->getClientOriginalName()));
92 92
         $uploadSuccess = $attributes['file']->move($destinationPath, $filename);
93 93
 
94 94
         if ($uploadSuccess) {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $this->model = $this->find($brandId);
140 140
 
141
-        if($this->model) {
141
+        if ($this->model) {
142 142
             $attributes['modified_by_user_id'] = auth('hideyobackend')->user()->id;
143 143
             $image = $this->findImage($imageId);
144 144
             $image->fill($attributes);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     {
201 201
         $result = $this->repo->getModelImage()->get();
202 202
         $shop = ShopService::find($shopId);
203
-        if($result AND $shop->thumbnail_square_sizes) {
203
+        if ($result AND $shop->thumbnail_square_sizes) {
204 204
             foreach ($result as $productImage) {
205 205
                 if ($shop->thumbnail_square_sizes) {
206 206
                     $sizes = explode(',', $shop->thumbnail_square_sizes);
Please login to merge, or discard this patch.
src/Services/Client/ClientService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         }
46 46
 
47 47
         if ($clientId) {
48
-            $rules['email'] =   'required|email|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$clientId.' = id';
48
+            $rules['email'] = 'required|email|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$clientId.' = id';
49 49
         }
50 50
 
51 51
         return $rules;
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     {
161 161
         // create the validation rules ------------------------
162 162
         $rules = array(
163
-            'email'         => 'required|email',     // required and must be unique in the ducks table
163
+            'email'         => 'required|email', // required and must be unique in the ducks table
164 164
             'password'      => 'required',
165 165
             'firstname'     => 'required',
166 166
             'lastname'      => 'required',
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
     {
180 180
         $client = $this->repo->checkEmailByShopId($attributes['email'], $shopId);
181 181
 
182
-        if($client AND $client->account_created) {
182
+        if ($client AND $client->account_created) {
183 183
         	return false;
184 184
         }
185 185
 
186
-        if($client) {
186
+        if ($client) {
187 187
         	$model = $client;
188 188
         } else {
189 189
         	$model = $this->repo->getModel();
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $attributes['active'] = 0;
195 195
         $attributes['confirmed'] = 0;
196 196
         $attributes['confirmation_code'] = md5(uniqid(mt_rand(), true));      
197
-        if($accountConfirmed) {
197
+        if ($accountConfirmed) {
198 198
             $attributes['active'] = 1;
199 199
             $attributes['confirmed'] = 1;
200 200
             $attributes['confirmation_code'] = null;
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     {
231 231
         $clientAddress = $this->repoAddress->find($addressId);
232 232
 
233
-        if($clientAddress) {
233
+        if ($clientAddress) {
234 234
             $clientAddress->fill($attributes);
235 235
             $clientAddress->save();
236 236
 
Please login to merge, or discard this patch.