Passed
Push — master ( 81a345...8ff05f )
by Matthijs
01:44
created
src/Services/ExtraField/ExtraFieldService.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
  
10 10
 class ExtraFieldService extends BaseService
11 11
 {
12
-	public function __construct(ExtraFieldRepository $extraField)
13
-	{
14
-		$this->repo = $extraField;
15
-	}
12
+    public function __construct(ExtraFieldRepository $extraField)
13
+    {
14
+        $this->repo = $extraField;
15
+    }
16 16
 
17 17
 
18 18
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         );
46 46
         
47 47
         if ($extraFieldId) {
48
-            $rules['title'] =   'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$extraFieldId.' = id';
48
+            $rules['title'] = 'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$extraFieldId.' = id';
49 49
         }
50 50
 
51 51
         return $rules;
Please login to merge, or discard this patch.
src/Services/ExtraField/Entity/ExtraFieldRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
         return $this->model->select('extra_field.*')
35 35
         ->leftJoin('product_category_related_extra_field', 'extra_field.id', '=', 'product_category_related_extra_field.extra_field_id')
36 36
         
37
-        ->where(function ($query) use ($productCategoryId) {
37
+        ->where(function($query) use ($productCategoryId) {
38 38
 
39 39
             $query->where('all_products', '=', 1)
40
-            ->orWhereHas('categories', function ($query) use ($productCategoryId) {
40
+            ->orWhereHas('categories', function($query) use ($productCategoryId) {
41 41
 
42 42
                 $query->where('product_category_id', '=', $productCategoryId);
43 43
             });
Please login to merge, or discard this patch.
src/Services/SendingMethod/SendingMethodService.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
  
9 9
 class SendingMethodService extends BaseService
10 10
 {
11
-	public function __construct(SendingMethodRepository $sendingMethod)
12
-	{
13
-		$this->repo = $sendingMethod;
14
-	} 
11
+    public function __construct(SendingMethodRepository $sendingMethod)
12
+    {
13
+        $this->repo = $sendingMethod;
14
+    } 
15 15
 
16 16
     /**
17 17
      * The validation rules for the model.
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
         return $model;
126 126
     }
127 127
 
128
-	public function selectAllActiveByShopId($shopId)
128
+    public function selectAllActiveByShopId($shopId)
129 129
     {
130
-    	return $this->repo->selectAllActiveByShopId($shopId);
130
+        return $this->repo->selectAllActiveByShopId($shopId);
131 131
     }
132 132
 
133
-	public function selectOneByShopIdAndId($shopId, $sendingMethodId)
133
+    public function selectOneByShopIdAndId($shopId, $sendingMethodId)
134 134
     {
135
-    	$result = $this->repo->selectOneByShopIdAndId($shopId, $sendingMethodId);
135
+        $result = $this->repo->selectOneByShopIdAndId($shopId, $sendingMethodId);
136 136
 
137 137
         if ($result->isEmpty()) {
138 138
             return false;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
             'maximal_weight'    => 'numeric|nullable'
30 30
         );
31 31
         
32
-        if($sendingMethodId) {
33
-            $rules['title'] =   $rules['title'].','.$sendingMethodId.' = id';
32
+        if ($sendingMethodId) {
33
+            $rules['title'] = $rules['title'].','.$sendingMethodId.' = id';
34 34
         }
35 35
 
36 36
         return $rules;
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
             'name' => 'required|between:4,65|unique_with:sending_method_country_price, sending_method_id'
45 45
         );
46 46
         
47
-        if($id) {
48
-            $rules['name'] =   'required|between:4,65|unique_with:sending_method_country_price, sending_method_id, '.$id.' = id';
47
+        if ($id) {
48
+            $rules['name'] = 'required|between:4,65|unique_with:sending_method_country_price, sending_method_id, '.$id.' = id';
49 49
         }
50 50
 
51 51
         return $rules;
Please login to merge, or discard this patch.
src/Services/SendingMethod/Entity/SendingMethodRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Services/Brand/BrandService.php 2 patches
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
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
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
      * The validation rules for the model.
Please login to merge, or discard this patch.
src/Services/Brand/Entity/BrandImage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Services/Brand/Entity/Brand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/Services/Faq/FaqService.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Services/Faq/Entity/FaqItemRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.