Passed
Push — master ( 15fb0b...7beac6 )
by Matthijs
01:41
created
src/database/migrations/2014_09_17_065601_confide_setup_users_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
         Schema::dropIfExists('users');
15 15
 
16 16
         // Creates the users table
17
-        Schema::create('user', function ($table) {
17
+        Schema::create('user', function($table) {
18 18
             $table->increments('id');
19 19
             $table->string('username')->unique();
20 20
             $table->string('email')->unique();
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         });
31 31
 
32 32
         // Creates password reminders table
33
-        Schema::create('password_reminders', function ($table) {
33
+        Schema::create('password_reminders', function($table) {
34 34
             $table->string('email');
35 35
             $table->string('token');
36 36
             $table->timestamp('created_at');
Please login to merge, or discard this patch.
src/database/migrations/2015_07_12_191806_invoice_table.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('invoice', function (Blueprint $table) {
16
+        Schema::create('invoice', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->decimal('price_with_tax', 12, 4)->nullable();
19 19
             $table->decimal('price_without_tax', 12, 4)->nullable();
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         });
35 35
 
36 36
 
37
-        Schema::create('invoice_rule', function (Blueprint $table) {
37
+        Schema::create('invoice_rule', function(Blueprint $table) {
38 38
             $table->increments('id');
39 39
             $table->enum('type', array('product', 'sending_cost', 'payment_cost', 'extra'));
40 40
             $table->string('title');
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             $table->timestamps();
55 55
         });
56 56
 
57
-        Schema::create('invoice_address', function (Blueprint $table) {
57
+        Schema::create('invoice_address', function(Blueprint $table) {
58 58
             $table->increments('id');
59 59
             $table->string('company')->nullable();
60 60
             $table->enum('gender', array('male', 'female'));
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
             $table->timestamps();
78 78
         });
79 79
 
80
-        Schema::table('invoice', function (Blueprint $table) {
80
+        Schema::table('invoice', function(Blueprint $table) {
81 81
             $table->integer('delivery_invoice_address_id')->unsigned()->nullable();
82 82
             $table->foreign('delivery_invoice_address_id', 'i_delivery_invoice_address_id_fk')->references('id')->on('invoice_address')->onDelete('set null');
83 83
             $table->integer('bill_invoice_address_id')->unsigned()->nullable();
84 84
             $table->foreign('bill_invoice_address_id', 'i_bill_invoice_address_id_fk')->references('id')->on('invoice_address')->onDelete('set null');
85 85
         });
86 86
 
87
-        Schema::table('invoice_rule', function (Blueprint $table) {
87
+        Schema::table('invoice_rule', function(Blueprint $table) {
88 88
             $table->string('reference_code')->nullable();
89 89
             $table->string('product_attribute_title')->nullable();
90 90
             $table->integer('product_attribute_id')->unsigned()->nullable();
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
      */
35 35
     public function down()
36 36
     {
37
-     //
37
+        //
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
src/database/migrations/2014_10_12_121532_payment_method_table.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('payment_method', function (Blueprint $table) {
16
+        Schema::create('payment_method', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->boolean('active')->default(false);
19 19
             $table->integer('shop_id')->unsigned();
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null');
40 40
             $table->timestamps();
41 41
 
42
-            $table->unique(array('title','shop_id'), 'unique_payment_method_title');
42
+            $table->unique(array('title', 'shop_id'), 'unique_payment_method_title');
43 43
         });
44 44
     }
45 45
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
      */
35 35
     public function down()
36 36
     {
37
-     //
37
+        //
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
src/database/migrations/2014_10_15_074650_order_table.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('order', function (Blueprint $table) {
16
+        Schema::create('order', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->boolean('validated')->default(false);
19 19
             $table->integer('client_id')->unsigned()->nullable();
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $table->timestamps();
48 48
         });
49 49
 
50
-        Schema::create('order_status_email_template', function (Blueprint $table) {
50
+        Schema::create('order_status_email_template', function(Blueprint $table) {
51 51
             $table->increments('id');
52 52
             $table->string('title');
53 53
             $table->string('subject');
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
             $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null');
59 59
             $table->timestamps();
60 60
 
61
-            $table->unique(array('title','shop_id'), 'unique_email_template_title');
61
+            $table->unique(array('title', 'shop_id'), 'unique_email_template_title');
62 62
         });
63 63
 
64 64
 
65
-        Schema::create('order_status', function (Blueprint $table) {
65
+        Schema::create('order_status', function(Blueprint $table) {
66 66
             $table->increments('id');
67 67
             $table->string('title');
68 68
             $table->string('color');
@@ -84,16 +84,16 @@  discard block
 block discarded – undo
84 84
             $table->timestamps();
85 85
 
86 86
 
87
-            $table->unique(array('title','shop_id'), 'unique_order_status_title');
87
+            $table->unique(array('title', 'shop_id'), 'unique_order_status_title');
88 88
         });
89 89
 
90
-        Schema::table('order', function (Blueprint $table) {
90
+        Schema::table('order', function(Blueprint $table) {
91 91
             $table->integer('order_status_id')->unsigned()->nullable();
92 92
             $table->foreign('order_status_id')->references('id')->on('order_status')->onDelete('set null');
93 93
         });
94 94
 
95 95
 
96
-        Schema::create('order_product', function (Blueprint $table) {
96
+        Schema::create('order_product', function(Blueprint $table) {
97 97
             $table->increments('id');
98 98
             $table->integer('order_id')->unsigned()->nullable();
99 99
             $table->foreign('order_id')->references('id')->on('order')->onDelete('cascade');
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $table->timestamps();
118 118
         });
119 119
 
120
-        Schema::table('order_product', function (Blueprint $table) {
120
+        Schema::table('order_product', function(Blueprint $table) {
121 121
             $table->string('reference_code')->nullable();
122 122
             $table->string('product_attribute_title')->nullable();
123 123
             $table->integer('product_attribute_id')->unsigned()->nullable();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         });
126 126
 
127 127
 
128
-        Schema::create('order_address', function (Blueprint $table) {
128
+        Schema::create('order_address', function(Blueprint $table) {
129 129
             $table->increments('id');
130 130
             $table->integer('order_id')->unsigned()->nullable();
131 131
             $table->foreign('order_id')->references('id')->on('order')->onDelete('cascade');
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             $table->timestamps();
149 149
         });
150 150
 
151
-        Schema::table('order', function (Blueprint $table) {
151
+        Schema::table('order', function(Blueprint $table) {
152 152
             $table->integer('delivery_order_address_id')->unsigned()->nullable();
153 153
             $table->integer('bill_order_address_id')->unsigned()->nullable();
154 154
             $table->foreign('delivery_order_address_id')->references('id')->on('order_address')->onDelete('set null');
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         });
157 157
 
158 158
 
159
-        Schema::create('order_sending_method', function (Blueprint $table) {
159
+        Schema::create('order_sending_method', function(Blueprint $table) {
160 160
             $table->increments('id');
161 161
             $table->integer('order_id')->unsigned()->nullable();
162 162
             $table->foreign('order_id')->references('id')->on('order')->onDelete('cascade');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         });
176 176
 
177 177
 
178
-        Schema::create('order_payment_method', function (Blueprint $table) {
178
+        Schema::create('order_payment_method', function(Blueprint $table) {
179 179
             $table->increments('id');
180 180
             $table->integer('order_id')->unsigned()->nullable();
181 181
             $table->foreign('order_id')->references('id')->on('order')->onDelete('cascade');
Please login to merge, or discard this patch.
src/Services/HtmlBlock/HtmlBlockService.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
  
12 12
 class HtmlBlockService extends BaseService
13 13
 {
14
-	public function __construct(HtmlBlockRepository $htmlBlock)
15
-	{
16
-		$this->repo = $htmlBlock;
14
+    public function __construct(HtmlBlockRepository $htmlBlock)
15
+    {
16
+        $this->repo = $htmlBlock;
17 17
         $this->storageImagePath = storage_path() .config('hideyo.storage_path'). "/html_block/";
18 18
         $this->publicImagePath = public_path() .config('hideyo.public_path'). "/html_block/";
19
-	} 
19
+    } 
20 20
 
21
-   /**
21
+    /**
22 22
      * The validation rules for the model.
23 23
      *
24 24
      * @param  integer  $htmlBlockId id attribute model    
@@ -250,17 +250,17 @@  discard block
 block discarded – undo
250 250
 
251 251
     public function selectByLimitAndOrderBy($shopId, $limit, $orderBy)
252 252
     {
253
-    	return $this->repo->selectByLimitAndOrderBy($shopId, $limit, $orderBy);
253
+        return $this->repo->selectByLimitAndOrderBy($shopId, $limit, $orderBy);
254 254
     }
255 255
 
256 256
     public function selectOneBySlug($shopId, $slug)
257 257
     {
258
-    	return $this->repo->selectOneBySlug($shopId, $slug);
258
+        return $this->repo->selectOneBySlug($shopId, $slug);
259 259
     }
260 260
 
261 261
     public function selectAllActiveGroupsByShopId($shopId)
262 262
     {
263
-    	return $this->repo->selectAllActiveGroupsByShopId($shopId);
263
+        return $this->repo->selectAllActiveGroupsByShopId($shopId);
264 264
     }
265 265
 
266 266
     public function selectOneByShopIdAndPosition($position, $shopId) {
Please login to merge, or discard this 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(HtmlBlockRepository $htmlBlock)
15 15
 	{
16 16
 		$this->repo = $htmlBlock;
17
-        $this->storageImagePath = storage_path() .config('hideyo.storage_path'). "/html_block/";
18
-        $this->publicImagePath = public_path() .config('hideyo.public_path'). "/html_block/";
17
+        $this->storageImagePath = storage_path().config('hideyo.storage_path')."/html_block/";
18
+        $this->publicImagePath = public_path().config('hideyo.public_path')."/html_block/";
19 19
 	} 
20 20
 
21 21
    /**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         );
33 33
         
34 34
         if ($htmlBlockId) {
35
-            $rules['title'] =   'required|between:4,65';
35
+            $rules['title'] = 'required|between:4,65';
36 36
         }
37 37
   
38 38
         return $rules;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 return $validator;
67 67
             } else {
68 68
                 $destinationPath = $this->storageImagePath.$this->model->id;
69
-                $filename =  str_replace(" ", "_", strtolower($attributes['image']->getClientOriginalName()));
69
+                $filename = str_replace(" ", "_", strtolower($attributes['image']->getClientOriginalName()));
70 70
                 $uploadSuccess = $attributes['image']->move($destinationPath, $filename);
71 71
 
72 72
                 if ($uploadSuccess) {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function createCopy(array $attributes, $htmlBlockId)
114 114
     {
115 115
 
116
-        $product =  $this->find($htmlBlockId);
116
+        $product = $this->find($htmlBlockId);
117 117
         $attributes['shop_id'] = auth('hideyobackend')->user()->selected_shop_id;
118 118
         $validator = Validator::make($attributes, $this->rules());
119 119
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 return $validator;
200 200
             } else {
201 201
                 $destinationPath = $this->storageImagePath.$this->model->id;
202
-                $filename =  str_replace(" ", "_", strtolower($attributes['image']->getClientOriginalName()));
202
+                $filename = str_replace(" ", "_", strtolower($attributes['image']->getClientOriginalName()));
203 203
                 File::deleteDirectory($destinationPath);
204 204
 
205 205
                 $uploadSuccess = $attributes['image']->move($destinationPath, $filename);
Please login to merge, or discard this patch.
src/Services/HtmlBlock/Entity/HtmlBlockRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     function selectAllActiveByShopId($shopId)
22 22
     {
23
-         return $this->model->where('shop_id', '=', $shopId)->get();
23
+            return $this->model->where('shop_id', '=', $shopId)->get();
24 24
     }
25 25
 
26 26
     function selectOneByShopIdAndSlug($shopId, $slug)
Please login to merge, or discard this patch.
src/Services/Content/ContentService.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 ContentService extends BaseService
11 11
 {
12
-	public function __construct(ContentRepository $taxRate)
13
-	{
14
-		$this->repo = $taxRate;
15
-	} 
12
+    public function __construct(ContentRepository $taxRate)
13
+    {
14
+        $this->repo = $taxRate;
15
+    } 
16 16
 
17 17
     /**
18 18
      * The validation rules for the model.
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             );
33 33
             
34 34
             if ($contentId) {
35
-                $rules['title'] =   'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$contentId.' = id';
35
+                $rules['title'] = 'required|between:4,65|unique_with:'.$this->repo->getModel()->getTable().', shop_id, '.$contentId.' = id';
36 36
             }
37 37
         }
38 38
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             }
86 86
         }
87 87
 
88
-        $directory = app_path() . "/storage/files/".$this->model->shop_id."/content/".$this->model->id;
88
+        $directory = app_path()."/storage/files/".$this->model->shop_id."/content/".$this->model->id;
89 89
         File::deleteDirectory($directory);
90 90
 
91 91
         return $this->model->delete();
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         );
104 104
         
105 105
         if ($contentGroupId) {
106
-            $rules['title'] =   'required|between:4,65|unique:'.$this->repo->getGroupModel()->getTable().',title,'.$contentGroupId;
106
+            $rules['title'] = 'required|between:4,65|unique:'.$this->repo->getGroupModel()->getTable().',title,'.$contentGroupId;
107 107
         }
108 108
 
109 109
 
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
 
148 148
         $attributes['modified_by_user_id'] = $userId;
149 149
 
150
-        $destinationPath = storage_path() . "/app/files/content/".$contentId;
150
+        $destinationPath = storage_path()."/app/files/content/".$contentId;
151 151
         $attributes['user_id'] = $userId;
152 152
         $attributes['content_id'] = $contentId;
153 153
         $attributes['extension'] = $attributes['file']->getClientOriginalExtension();
154 154
         $attributes['size'] = $attributes['file']->getSize();
155 155
         
156
-        $filename =  str_replace(" ", "_", strtolower($attributes['file']->getClientOriginalName()));
156
+        $filename = str_replace(" ", "_", strtolower($attributes['file']->getClientOriginalName()));
157 157
         $uploadSuccess = $attributes['file']->move($destinationPath, $filename);
158 158
 
159 159
         if ($uploadSuccess) {
@@ -172,10 +172,10 @@  discard block
 block discarded – undo
172 172
                         $image->resize($explode[0], $explode[1]);
173 173
                         $image->interlace();
174 174
 
175
-                        if (!File::exists(public_path() . "/files/content/".$valueSize."/".$contentId."/")) {
176
-                            File::makeDirectory(public_path() . "/files/content/".$valueSize."/".$contentId."/", 0777, true);
175
+                        if (!File::exists(public_path()."/files/content/".$valueSize."/".$contentId."/")) {
176
+                            File::makeDirectory(public_path()."/files/content/".$valueSize."/".$contentId."/", 0777, true);
177 177
                         }
178
-                        $image->save(public_path() . "/files/content/".$valueSize."/".$contentId."/".$filename);
178
+                        $image->save(public_path()."/files/content/".$valueSize."/".$contentId."/".$filename);
179 179
                     }
180 180
                 }
181 181
             }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     public function destroyImage($newsImageId)
229 229
     {
230 230
         $this->modelImage = $this->findImage($newsImageId);
231
-        $filename = storage_path() ."/app/files/content/".$this->modelImage->content_id."/".$this->modelImage->file;
231
+        $filename = storage_path()."/app/files/content/".$this->modelImage->content_id."/".$this->modelImage->file;
232 232
         $shopId = auth('hideyobackend')->user()->selected_shop_id;
233 233
         $shop = ShopService::find($shopId);
234 234
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 $sizes = explode(',', $shop->square_thumbnail_sizes);
239 239
                 if ($sizes) {
240 240
                     foreach ($sizes as $valueSize) {
241
-                        File::delete(public_path() . "/files/content/".$valueSize."/".$this->modelImage->content_id."/".$this->modelImage->file);
241
+                        File::delete(public_path()."/files/content/".$valueSize."/".$this->modelImage->content_id."/".$this->modelImage->file);
242 242
                     }
243 243
                 }
244 244
             }
Please login to merge, or discard this patch.
src/Services/Content/Entity/ContentImage.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 = 'content_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 = ['content_id', 'file', 'extension', 'size', 'path', 'rank', 'tag', 'modified_by_user_id',];
19
+    protected $fillable = ['content_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/PaymentMethod/PaymentMethodService.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 block discarded – undo
9 9
  
10 10
 class PaymentMethodService extends BaseService
11 11
 {
12
-	public function __construct(PaymentMethodRepository $paymentMethod)
13
-	{
14
-		$this->repo = $paymentMethod;
15
-	}
12
+    public function __construct(PaymentMethodRepository $paymentMethod)
13
+    {
14
+        $this->repo = $paymentMethod;
15
+    }
16 16
 
17 17
     public function selectOneByShopIdAndId($shopId, $paymentMethodId)
18 18
     {
19
-    	$result = $this->repo->selectOneByShopIdAndId($shopId, $paymentMethodId);
19
+        $result = $this->repo->selectOneByShopIdAndId($shopId, $paymentMethodId);
20 20
 
21 21
         if ($result->isEmpty()) {
22 22
             return false;
Please login to merge, or discard this 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
         
41 41
         if ($paymentMethodId) {
42
-            $rules['title'] =   $rules['title'].','.$paymentMethodId.' = id';
42
+            $rules['title'] = $rules['title'].','.$paymentMethodId.' = id';
43 43
         }
44 44
 
45 45
         return $rules;
Please login to merge, or discard this patch.