Test Setup Failed
Push — development ( d24cd2...0e86e7 )
by Ashutosh
08:42
created
app/Model/Common/StatusSetting.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,5 +8,5 @@
 block discarded – undo
8 8
 {
9 9
     protected $table = 'status_settings';
10 10
     public $timestamps = false;
11
-    protected $fillable = ['expiry_mail', 'activity_log_delete', 'license_status', 'github_status', 'mailchimp_status', 'twitter_status', 'msg91_status', 'emailverification_status', 'recaptcha_status', 'update_status', 'zoho_status', 'rzp_status', 'mailchimp_product_status', 'mailchimp_ispaid_status','terms'];
11
+    protected $fillable = ['expiry_mail', 'activity_log_delete', 'license_status', 'github_status', 'mailchimp_status', 'twitter_status', 'msg91_status', 'emailverification_status', 'recaptcha_status', 'update_status', 'zoho_status', 'rzp_status', 'mailchimp_product_status', 'mailchimp_ispaid_status', 'terms'];
12 12
 }
Please login to merge, or discard this patch.
app/Model/Order/Invoice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     use LogsActivity;
13 13
     protected $table = 'invoices';
14
-    protected $fillable = ['user_id', 'number', 'date', 'coupon_code','discount',
14
+    protected $fillable = ['user_id', 'number', 'date', 'coupon_code', 'discount',
15 15
     'grand_total', 'currency', 'status', 'description', ];
16 16
     protected $dates = ['date'];
17 17
     protected static $logName = 'Invoice';
Please login to merge, or discard this patch.
app/Model/License/LicenseType.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
43 43
     {
44 44
         $this->permissions()->detach();
45 45
         $this->products()->delete();
46
-         return parent::delete();
46
+            return parent::delete();
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     public function products()
38 38
     {
39
-        return $this->hasMany('App\Model\Product\Product','type');
39
+        return $this->hasMany('App\Model\Product\Product', 'type');
40 40
     }
41 41
 
42 42
     public function delete()
Please login to merge, or discard this patch.
app/Traits/CoupCodeAndInvoiceSearch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -374,11 +374,11 @@
 block discarded – undo
374 374
         }
375 375
     }
376 376
 
377
-    public function getCodeValue($promo,$code)
377
+    public function getCodeValue($promo, $code)
378 378
     {
379
-        if($promo && $code) {
379
+        if ($promo && $code) {
380 380
             return $promo->value;
381 381
         }
382
-        return ;
382
+        return;
383 383
     }
384 384
 }
Please login to merge, or discard this patch.
app/ApiKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,5 +9,5 @@
 block discarded – undo
9 9
     protected $table = 'api_keys';
10 10
     protected $fillable = ['rzp_key', 'rzp_secret', 'apilayer_key', 'bugsnag_api_key',
11 11
     'zoho_api_key', 'msg91_auth_key', 'twitter_consumer_key',
12
-    'twitter_consumer_secret', 'twitter_access_token', 'access_tooken_secret', 'license_api_secret', 'license_api_url', 'nocaptcha_sitekey', 'captcha_secretCheck', 'update_api_url', 'update_api_secret','terms_url' ];
12
+    'twitter_consumer_secret', 'twitter_access_token', 'access_tooken_secret', 'license_api_secret', 'license_api_url', 'nocaptcha_sitekey', 'captcha_secretCheck', 'update_api_url', 'update_api_secret', 'terms_url'];
13 13
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/BaseSettingsController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
             $captcha_secretCheck = '00';
339 339
             $path_to_file = base_path('.env');
340 340
             $file_contents = file_get_contents($path_to_file);
341
-             $file_contents_sitekey = str_replace(env('NOCAPTCHA_SITEKEY'), $nocaptcha_sitekey, $file_contents);
341
+                $file_contents_sitekey = str_replace(env('NOCAPTCHA_SITEKEY'), $nocaptcha_sitekey, $file_contents);
342 342
             file_put_contents($path_to_file, $file_contents_sitekey);
343 343
             $file_contents_secretchek = str_replace(env('NOCAPTCHA_SECRET'), $captcha_secretCheck, $file_contents);
344 344
             file_put_contents($path_to_file, $file_contents_secretchek);
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 
351 351
         StatusSetting::where('id', 1)->update(['recaptcha_status'=>$status]);
352 352
         ApiKey::where('id', 1)->update(['nocaptcha_sitekey'=> $nocaptcha_sitekey,
353
-         'captcha_secretCheck'                             => $captcha_secretCheck, ]);
353
+            'captcha_secretCheck'                             => $captcha_secretCheck, ]);
354 354
 
355 355
         return ['message' => 'success', 'update'=>'Recaptcha Settings Updated'];
356 356
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/SettingsController.php 2 patches
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -302,37 +302,37 @@  discard block
 block discarded – undo
302 302
             $query = $this->advanceSearch($from, $till, $delFrom, $delTill);
303 303
 
304 304
             return \DataTables::of($query->take(50))
305
-             ->setTotalRecords($query->count())
306
-             ->addColumn('checkbox', function ($model) {
307
-                 return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
308
-             })
309
-                           ->addColumn('name', function ($model) {
310
-                               return ucfirst($model->log_name);
311
-                           })
312
-                             ->addColumn('description', function ($model) {
313
-                                 return ucfirst($model->description);
314
-                             })
315
-                          ->addColumn('username', function ($model) {
316
-                              $causer_id = $model->causer_id;
317
-                              $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
318
-                              foreach ($names as $key => $value) {
319
-                                  $fullName = $key.' '.$value;
320
-
321
-                                  return $fullName;
322
-                              }
323
-                          })
324
-                              ->addColumn('role', function ($model) {
325
-                                  $causer_id = $model->causer_id;
326
-                                  $role = User::where('id', $causer_id)->pluck('role');
327
-
328
-                                  return json_decode($role);
329
-                              })
330
-                               ->addColumn('new', function ($model) {
331
-                                   $properties = ($model->properties);
332
-                                   $newEntry = $this->getNewEntry($properties, $model);
333
-
334
-                                   return $newEntry;
335
-                               })
305
+                ->setTotalRecords($query->count())
306
+                ->addColumn('checkbox', function ($model) {
307
+                    return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
308
+                })
309
+                            ->addColumn('name', function ($model) {
310
+                                return ucfirst($model->log_name);
311
+                            })
312
+                                ->addColumn('description', function ($model) {
313
+                                    return ucfirst($model->description);
314
+                                })
315
+                            ->addColumn('username', function ($model) {
316
+                                $causer_id = $model->causer_id;
317
+                                $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
318
+                                foreach ($names as $key => $value) {
319
+                                    $fullName = $key.' '.$value;
320
+
321
+                                    return $fullName;
322
+                                }
323
+                            })
324
+                                ->addColumn('role', function ($model) {
325
+                                    $causer_id = $model->causer_id;
326
+                                    $role = User::where('id', $causer_id)->pluck('role');
327
+
328
+                                    return json_decode($role);
329
+                                })
330
+                                ->addColumn('new', function ($model) {
331
+                                    $properties = ($model->properties);
332
+                                    $newEntry = $this->getNewEntry($properties, $model);
333
+
334
+                                    return $newEntry;
335
+                                })
336 336
                                 ->addColumn('old', function ($model) {
337 337
                                     $data = ($model->properties);
338 338
                                     $oldEntry = $this->getOldEntry($data, $model);
@@ -376,42 +376,42 @@  discard block
 block discarded – undo
376 376
             $email_log = \DB::table('email_log')->orderBy('date', 'desc')->get();
377 377
 
378 378
             return\ DataTables::of($email_log)
379
-             ->addColumn('checkbox', function ($model) {
380
-                 return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
381
-             })
382
-                           ->addColumn('date', function ($model) {
383
-                              $date = $model->date;
384
-                              if ($date) {
385
-                                  $date1 = new \DateTime($date);
386
-                                  $tz = \Auth::user()->timezone()->first()->name;
387
-                                  $date1->setTimezone(new \DateTimeZone($tz));
388
-                                  $finalDate = $date1->format('M j, Y, g:i a ');
389
-                              }
390
-                               return $finalDate;
391
-                           })
392
-                             ->addColumn('from', function ($model) {
393
-                                 $from = Markdown::convertToHtml($model->from);
394
-
395
-                                 return $from;
396
-                             })
397
-                              ->addColumn('to', function ($model) {
398
-                                  $to = Markdown::convertToHtml($model->to);
399
-
400
-                                  return $to;
401
-                              })
379
+                ->addColumn('checkbox', function ($model) {
380
+                    return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
381
+                })
382
+                            ->addColumn('date', function ($model) {
383
+                                $date = $model->date;
384
+                                if ($date) {
385
+                                    $date1 = new \DateTime($date);
386
+                                    $tz = \Auth::user()->timezone()->first()->name;
387
+                                    $date1->setTimezone(new \DateTimeZone($tz));
388
+                                    $finalDate = $date1->format('M j, Y, g:i a ');
389
+                                }
390
+                                return $finalDate;
391
+                            })
392
+                                ->addColumn('from', function ($model) {
393
+                                    $from = Markdown::convertToHtml($model->from);
394
+
395
+                                    return $from;
396
+                                })
397
+                                ->addColumn('to', function ($model) {
398
+                                    $to = Markdown::convertToHtml($model->to);
399
+
400
+                                    return $to;
401
+                                })
402 402
                              
403 403
 
404
-                               ->addColumn('subject', function ($model) {
405
-                                   return ucfirst($model->subject);
406
-                               })
404
+                                ->addColumn('subject', function ($model) {
405
+                                    return ucfirst($model->subject);
406
+                                })
407 407
                                 // ->addColumn('headers', function ($model) {
408 408
                                 //     $headers = Markdown::convertToHtml(ucfirst($model->headers));
409 409
 
410 410
                                 //     return $headers;
411 411
                                 // })
412
-                              ->addColumn('status', function ($model) {
413
-                                  return ucfirst($model->status);
414
-                              })
412
+                                ->addColumn('status', function ($model) {
413
+                                    return ucfirst($model->status);
414
+                                })
415 415
 
416 416
                             ->rawColumns(['checkbox', 'date', 'from', 'to',
417 417
                                 'bcc', 'subject',  'status', ])
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $mobileauthkey = $apikeys->pluck('msg91_auth_key')->first();
69 69
             $updateUrl = $apikeys->pluck('update_api_url')->first();
70 70
             $emailStatus = StatusSetting::pluck('emailverification_status')->first();
71
-            $twitterKeys = $apikeys->select('twitter_consumer_key','twitter_consumer_secret',
71
+            $twitterKeys = $apikeys->select('twitter_consumer_key', 'twitter_consumer_secret',
72 72
                 'twitter_access_token', 'access_tooken_secret')->first();
73 73
             $twitterStatus = $this->statusSetting->pluck('twitter_status')->first();
74 74
             $zohoStatus = $this->statusSetting->pluck('zoho_status')->first();
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $termsUrl = $apikeys->pluck('terms_url')->first();
82 82
             $model = $apikeys->find(1);
83 83
 
84
-            return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey','termsStatus','termsUrl'));
84
+            return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey', 'termsStatus', 'termsUrl'));
85 85
         } catch (\Exception $ex) {
86 86
             return redirect('/')->with('fails', $ex->getMessage());
87 87
         }
@@ -303,16 +303,16 @@  discard block
 block discarded – undo
303 303
 
304 304
             return \DataTables::of($query->take(50))
305 305
              ->setTotalRecords($query->count())
306
-             ->addColumn('checkbox', function ($model) {
306
+             ->addColumn('checkbox', function($model) {
307 307
                  return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
308 308
              })
309
-                           ->addColumn('name', function ($model) {
309
+                           ->addColumn('name', function($model) {
310 310
                                return ucfirst($model->log_name);
311 311
                            })
312
-                             ->addColumn('description', function ($model) {
312
+                             ->addColumn('description', function($model) {
313 313
                                  return ucfirst($model->description);
314 314
                              })
315
-                          ->addColumn('username', function ($model) {
315
+                          ->addColumn('username', function($model) {
316 316
                               $causer_id = $model->causer_id;
317 317
                               $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
318 318
                               foreach ($names as $key => $value) {
@@ -321,41 +321,41 @@  discard block
 block discarded – undo
321 321
                                   return $fullName;
322 322
                               }
323 323
                           })
324
-                              ->addColumn('role', function ($model) {
324
+                              ->addColumn('role', function($model) {
325 325
                                   $causer_id = $model->causer_id;
326 326
                                   $role = User::where('id', $causer_id)->pluck('role');
327 327
 
328 328
                                   return json_decode($role);
329 329
                               })
330
-                               ->addColumn('new', function ($model) {
330
+                               ->addColumn('new', function($model) {
331 331
                                    $properties = ($model->properties);
332 332
                                    $newEntry = $this->getNewEntry($properties, $model);
333 333
 
334 334
                                    return $newEntry;
335 335
                                })
336
-                                ->addColumn('old', function ($model) {
336
+                                ->addColumn('old', function($model) {
337 337
                                     $data = ($model->properties);
338 338
                                     $oldEntry = $this->getOldEntry($data, $model);
339 339
 
340 340
                                     return $oldEntry;
341 341
                                 })
342
-                                ->addColumn('created_at', function ($model) {
342
+                                ->addColumn('created_at', function($model) {
343 343
                                     $newDate = $this->getDate($model->created_at);
344 344
 
345 345
                                     return $newDate;
346 346
                                 })
347 347
 
348
-                                    ->filterColumn('log_name', function ($query, $keyword) {
348
+                                    ->filterColumn('log_name', function($query, $keyword) {
349 349
                                         $sql = 'log_name like ?';
350 350
                                         $query->whereRaw($sql, ["%{$keyword}%"]);
351 351
                                     })
352 352
 
353
-                                ->filterColumn('description', function ($query, $keyword) {
353
+                                ->filterColumn('description', function($query, $keyword) {
354 354
                                     $sql = 'description like ?';
355 355
                                     $query->whereRaw($sql, ["%{$keyword}%"]);
356 356
                                 })
357 357
 
358
-                            ->filterColumn('causer_id', function ($query, $keyword) {
358
+                            ->filterColumn('causer_id', function($query, $keyword) {
359 359
                                 $sql = 'first_name like ?';
360 360
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
361 361
                             })
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
             $email_log = \DB::table('email_log')->orderBy('date', 'desc')->get();
377 377
 
378 378
             return\ DataTables::of($email_log)
379
-             ->addColumn('checkbox', function ($model) {
379
+             ->addColumn('checkbox', function($model) {
380 380
                  return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
381 381
              })
382
-                           ->addColumn('date', function ($model) {
382
+                           ->addColumn('date', function($model) {
383 383
                               $date = $model->date;
384 384
                               if ($date) {
385 385
                                   $date1 = new \DateTime($date);
@@ -389,19 +389,19 @@  discard block
 block discarded – undo
389 389
                               }
390 390
                                return $finalDate;
391 391
                            })
392
-                             ->addColumn('from', function ($model) {
392
+                             ->addColumn('from', function($model) {
393 393
                                  $from = Markdown::convertToHtml($model->from);
394 394
 
395 395
                                  return $from;
396 396
                              })
397
-                              ->addColumn('to', function ($model) {
397
+                              ->addColumn('to', function($model) {
398 398
                                   $to = Markdown::convertToHtml($model->to);
399 399
 
400 400
                                   return $to;
401 401
                               })
402 402
                              
403 403
 
404
-                               ->addColumn('subject', function ($model) {
404
+                               ->addColumn('subject', function($model) {
405 405
                                    return ucfirst($model->subject);
406 406
                                })
407 407
                                 // ->addColumn('headers', function ($model) {
@@ -409,12 +409,12 @@  discard block
 block discarded – undo
409 409
 
410 410
                                 //     return $headers;
411 411
                                 // })
412
-                              ->addColumn('status', function ($model) {
412
+                              ->addColumn('status', function($model) {
413 413
                                   return ucfirst($model->status);
414 414
                               })
415 415
 
416 416
                             ->rawColumns(['checkbox', 'date', 'from', 'to',
417
-                                'bcc', 'subject',  'status', ])
417
+                                'bcc', 'subject', 'status', ])
418 418
                             ->make(true);
419 419
         } catch (\Exception $e) {
420 420
             Bugsnag::notifyException($e);
Please login to merge, or discard this patch.
app/Http/Controllers/Common/BaseCronController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@
 block discarded – undo
50 50
                     array_push($sub, $this->getAllDaysSubscription($allDay));
51 51
                 }
52 52
             } elseif ($allDay == 1) {
53
-                if (count($this->get1DaysUsers())>0) {
53
+                if (count($this->get1DaysUsers()) > 0) {
54 54
                     array_push($sub, $this->get1DaysSubscription());
55 55
                 }
56 56
             } elseif ($allDay == 0) {
57
-                if (count($this->get0DaysUsers())>0) {
57
+                if (count($this->get0DaysUsers()) > 0) {
58 58
                     array_push($sub, $this->get0DaysSubscription());
59 59
                 }
60
-                if (count($this->getPlus1Users())>0) {
60
+                if (count($this->getPlus1Users()) > 0) {
61 61
                     array_push($sub, $this->getPlus1Subscription());
62 62
                 }
63 63
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/TemplateController.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
                             value=".$model->id.' name=select[] id=check>';
123 123
                         })
124 124
 
125
-                         ->addColumn('name', function ($model) {
126
-                             return $model->name;
127
-                         })
125
+                            ->addColumn('name', function ($model) {
126
+                                return $model->name;
127
+                            })
128 128
                         ->addColumn('type', function ($model) {
129 129
                             return $this->type->where('id', $model->type)->first()->name;
130 130
                         })
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     }
269 269
 
270 270
     public function mailing($from, $to, $data, $subject, $replace = [],
271
-     $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
271
+        $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
272 272
     {
273 273
         try {
274 274
             $transform = [];
@@ -301,10 +301,10 @@  discard block
 block discarded – undo
301 301
             'date'     => date('Y-m-d H:i:s'),
302 302
             'from'     => $from,
303 303
             'to'       => $to,
304
-             'subject' => $subject,
304
+                'subject' => $subject,
305 305
             'body'     => $data,
306 306
             'status'     => 'success',
307
-          ]);
307
+            ]);
308 308
             
309 309
             return 'success';
310 310
         } catch (\Exception $ex) {
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             'date'     => date('Y-m-d H:i:s'),
313 313
             'from'     => $from,
314 314
             'to'       => $to,
315
-             'subject' => $subject,
315
+                'subject' => $subject,
316 316
             'body'     => $data,
317 317
             'status'   => 'failed',
318 318
         ]);
Please login to merge, or discard this patch.