Passed
Branch master (45f86d)
by Ajit
06:39
created
app/Role.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         if (Auth::User()->id != 1) 
37 37
         {
38
-            return $query->where('id','!=',1);
38
+            return $query->where('id', '!=', 1);
39 39
         }
40 40
         return $query;
41 41
     }
Please login to merge, or discard this patch.
app/Cheque_detail.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@
 block discarded – undo
27 27
 
28 28
 	public function createdBy()
29 29
     {
30
-        return $this->belongsTo('App\User','created_by');
30
+        return $this->belongsTo('App\User', 'created_by');
31 31
     }
32 32
 
33 33
     public function updatedBy()
34 34
     {
35
-        return $this->belongsTo('App\User','updated_by');
35
+        return $this->belongsTo('App\User', 'updated_by');
36 36
     }  
37 37
 
38 38
     public function Payment()
39 39
     {
40
-    	return $this->belongsTo('App\Payment_detail','payment_id');
40
+    	return $this->belongsTo('App\Payment_detail', 'payment_id');
41 41
     }    
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
app/Expense.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,34 +30,34 @@  discard block
 block discarded – undo
30 30
         'amount' => 10,
31 31
     ];
32 32
     
33
-    protected $dates  = ['created_at', 'updated_at', 'due_date'];
33
+    protected $dates = ['created_at', 'updated_at', 'due_date'];
34 34
 
35 35
     public function createdBy()
36 36
     {
37
-        return $this->belongsTo('App\User','created_by');
37
+        return $this->belongsTo('App\User', 'created_by');
38 38
     }
39 39
 
40 40
     public function updatedBy()
41 41
     {
42
-        return $this->belongsTo('App\User','updated_by');
42
+        return $this->belongsTo('App\User', 'updated_by');
43 43
     }
44 44
 
45 45
     public function Category()
46 46
     {
47
-        return $this->belongsTo('App\ExpenseCategory','category_id');
47
+        return $this->belongsTo('App\ExpenseCategory', 'category_id');
48 48
     }
49 49
 
50 50
     public function scopeDueAlerts($query)
51 51
     {
52
-        return $query->where('paid','!=',\constPaymentStatus::Paid)->where('due_date','>=',Carbon::today());
52
+        return $query->where('paid', '!=', \constPaymentStatus::Paid)->where('due_date', '>=', Carbon::today());
53 53
     }
54 54
 
55 55
     public function scopeOutstandingAlerts($query)
56 56
     {
57
-        return $query->where('paid','!=',\constPaymentStatus::Paid)->where('due_date','<',Carbon::today());
57
+        return $query->where('paid', '!=', \constPaymentStatus::Paid)->where('due_date', '<', Carbon::today());
58 58
     }
59 59
 
60
-    public function scopeIndexQuery($query,$category,$sorting_field,$sorting_direction,$drp_start,$drp_end)
60
+    public function scopeIndexQuery($query, $category, $sorting_field, $sorting_direction, $drp_start, $drp_end)
61 61
     {
62 62
         $sorting_field = ($sorting_field != null ? $sorting_field : 'created_at');
63 63
         $sorting_direction = ($sorting_direction != null ? $sorting_direction : 'desc');
@@ -66,22 +66,22 @@  discard block
 block discarded – undo
66 66
         {
67 67
             if ($category == 0) 
68 68
             {
69
-                return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*','mst_expenses_categories.name as category_name')->orderBy($sorting_field,$sorting_direction);
69
+                return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*', 'mst_expenses_categories.name as category_name')->orderBy($sorting_field, $sorting_direction);
70 70
             } 
71 71
             else 
72 72
             {
73
-                return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*','mst_expenses_categories.name as category_name')->where('category_id',$category)->orderBy($sorting_field,$sorting_direction);
73
+                return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*', 'mst_expenses_categories.name as category_name')->where('category_id', $category)->orderBy($sorting_field, $sorting_direction);
74 74
             }
75 75
 
76 76
         }
77 77
 
78 78
         if ($category == 0) 
79 79
         {
80
-            return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*','mst_expenses_categories.name as category_name')->whereBetween('trn_expenses.created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
80
+            return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*', 'mst_expenses_categories.name as category_name')->whereBetween('trn_expenses.created_at', [$drp_start, $drp_end])->orderBy($sorting_field, $sorting_direction);
81 81
         } 
82 82
         else 
83 83
         {
84
-            return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*','mst_expenses_categories.name as category_name')->where('category_id',$category)->whereBetween('trn_expenses.created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
84
+            return $query->leftJoin('mst_expenses_categories', 'trn_expenses.category_id', '=', 'mst_expenses_categories.id')->select('trn_expenses.*', 'mst_expenses_categories.name as category_name')->where('category_id', $category)->whereBetween('trn_expenses.created_at', [$drp_start, $drp_end])->orderBy($sorting_field, $sorting_direction);
85 85
         }
86 86
         
87 87
     }
Please login to merge, or discard this patch.
app/Invoice_detail.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,21 +20,21 @@
 block discarded – undo
20 20
 
21 21
 	 public function createdBy()
22 22
     {
23
-        return $this->belongsTo('App\User','created_by');
23
+        return $this->belongsTo('App\User', 'created_by');
24 24
     }
25 25
 
26 26
     public function updatedBy()
27 27
     {
28
-        return $this->belongsTo('App\User','updated_by');
28
+        return $this->belongsTo('App\User', 'updated_by');
29 29
     }  
30 30
     
31 31
     public function Invoice()
32 32
     {
33
-    	return $this->belongsTo('App\Invoice','invoice_id');
33
+    	return $this->belongsTo('App\Invoice', 'invoice_id');
34 34
     }
35 35
 
36 36
     public function Plan()
37 37
     {
38
-        return $this->belongsTo('App\Plan','plan_id');
38
+        return $this->belongsTo('App\Plan', 'plan_id');
39 39
     }
40 40
 }
Please login to merge, or discard this patch.