Passed
Branch develop (995037)
by Ajit
05:32
created
app/Role.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
 class Role extends EntrustRole
9 9
 {
10 10
 
11
-	protected $table = 'roles';
11
+    protected $table = 'roles';
12 12
 
13 13
     protected $fillable = [
14
-    		'name',
15
-    		'display_name',
16
-    		'description',
14
+            'name',
15
+            'display_name',
16
+            'description',
17 17
     ];
18 18
 
19 19
     public function Users()
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     public function Permissions()
25 25
     {
26
-    	return $this->hasMany('App\Permission');
26
+        return $this->hasMany('App\Permission');
27 27
     }
28 28
 
29 29
     public function Role_users()
Please login to merge, or discard this 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 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,25 +7,25 @@  discard block
 block discarded – undo
7 7
 
8 8
 class Cheque_detail extends Model
9 9
 {
10
-	 protected $table = 'trn_cheque_details';
11
-
12
-	 protected $fillable = [
13
-	 		'payment_id',
14
-	 		'number',
15
-	 		'date',
16
-	 		'status',
17
-	 		'created_by',
18
-    		'updated_by',
19
-	 ];
20
-
21
-     //Eloquence Search mapping
10
+        protected $table = 'trn_cheque_details';
11
+
12
+        protected $fillable = [
13
+                'payment_id',
14
+                'number',
15
+                'date',
16
+                'status',
17
+                'created_by',
18
+            'updated_by',
19
+        ];
20
+
21
+        //Eloquence Search mapping
22 22
     use Eloquence;
23 23
 
24 24
     protected $searchableColumns = [
25 25
         'number' => 20,
26 26
     ];  
27 27
 
28
-	public function createdBy()
28
+    public function createdBy()
29 29
     {
30 30
         return $this->belongsTo('App\User','created_by');
31 31
     }
@@ -37,6 +37,6 @@  discard block
 block discarded – undo
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.
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 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@
 block discarded – undo
11 11
     protected $table = 'trn_expenses';
12 12
 
13 13
     protected $fillable = [
14
-    	  'name',
15
-    	  'category_id',
16
-          'amount',
17
-          'due_date',
18
-          'repeat',
19
-          'note',
20
-    	  'paid',
21
-    	  'created_by',
22
-    	  'updated_by'
14
+            'name',
15
+            'category_id',
16
+            'amount',
17
+            'due_date',
18
+            'repeat',
19
+            'note',
20
+            'paid',
21
+            'created_by',
22
+            'updated_by'
23 23
     ];
24 24
 
25 25
     //Eloquence Search mapping
Please login to merge, or discard this 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.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
             if ($category == 0) 
68 68
             {
69 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
-            } 
71
-            else 
70
+            } else 
72 71
             {
73 72
                 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 73
             }
@@ -78,8 +77,7 @@  discard block
 block discarded – undo
78 77
         if ($category == 0) 
79 78
         {
80 79
             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
-        } 
82
-        else 
80
+        } else 
83 81
         {
84 82
             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 83
         }
Please login to merge, or discard this patch.
app/Invoice_detail.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@  discard block
 block discarded – undo
6 6
 
7 7
 class Invoice_detail extends Model
8 8
 {
9
-	 protected $table = 'trn_invoice_details';
9
+        protected $table = 'trn_invoice_details';
10 10
 
11
-	 protected $fillable = [
11
+        protected $fillable = [
12 12
             'item_name',
13
-	 		'plan_id',
14
-	 		'item_description',
15
-	 		'invoice_id',
16
-	 		'item_amount',
17
-	 		'created_by',
18
-    		'updated_by',
19
-	 ];  
13
+                'plan_id',
14
+                'item_description',
15
+                'invoice_id',
16
+                'item_amount',
17
+                'created_by',
18
+            'updated_by',
19
+        ];  
20 20
 
21
-	 public function createdBy()
21
+        public function createdBy()
22 22
     {
23 23
         return $this->belongsTo('App\User','created_by');
24 24
     }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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()
Please login to merge, or discard this 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.
app/Setting.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
 
7 7
 class Setting extends Model
8 8
 {
9
-	 protected $table = 'trn_settings';
9
+        protected $table = 'trn_settings';
10 10
 
11
-	 protected $fillable = [
12
-	 		'key',
13
-	 		'value',
14
-	 ];
11
+        protected $fillable = [
12
+                'key',
13
+                'value',
14
+        ];
15 15
 
16
-	 const CREATED_AT = null;
16
+        const CREATED_AT = null;
17 17
 
18
-	// Issue to be fixed
19
-	 public function scopeValue($query)
20
-	 {
21
-	 	return $query->where('value','=','xyz')->pluck('key');
22
-	 }
18
+    // Issue to be fixed
19
+        public function scopeValue($query)
20
+        {
21
+            return $query->where('value','=','xyz')->pluck('key');
22
+        }
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 	// Issue to be fixed
19 19
 	 public function scopeValue($query)
20 20
 	 {
21
-	 	return $query->where('value','=','xyz')->pluck('key');
21
+	 	return $query->where('value', '=', 'xyz')->pluck('key');
22 22
 	 }
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
app/Role_user.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 class Role_user extends Model
8 8
 {
9 9
 
10
-	protected $table = 'role_user';
10
+    protected $table = 'role_user';
11 11
 
12 12
     public $timestamps = false;
13 13
 
14 14
     protected $fillable = [
15
-    		'user_id',
16
-    		'role_id',
15
+            'user_id',
16
+            'role_id',
17 17
     ];
18 18
 
19 19
     public function User()
Please login to merge, or discard this patch.
app/Permission_role.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 
7 7
 class Permission_role extends Model
8 8
 {
9
-	protected $table = 'permission_role';
9
+    protected $table = 'permission_role';
10 10
 
11
-	public $timestamps = false;
11
+    public $timestamps = false;
12 12
 
13 13
     protected $fillable = [
14
-    		'permission_id',
15
-    		'role_id',
14
+            'permission_id',
15
+            'role_id',
16 16
     ];
17 17
 }
18 18
\ No newline at end of file
Please login to merge, or discard this patch.