Passed
Branch master (45f86d)
by Ajit
06:39
created
app/Service.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
     protected $table = 'mst_services';
12 12
 
13 13
     protected $fillable = [
14
-    		'name',
15
-    		'description',
16
-    		'created_by',
17
-    		'updated_by'
14
+            'name',
15
+            'description',
16
+            'created_by',
17
+            'updated_by'
18 18
     ];
19 19
 
20 20
     //Eloquence Search mapping
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 Plans()
39 39
     {
40
-        return $this->hasMany('App\Plan','service_id');
40
+        return $this->hasMany('App\Plan', 'service_id');
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
app/Sms_trigger.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
 
12 12
     protected $fillable = [
13 13
             'name',
14
-    		'alias',
14
+            'alias',
15 15
             'message',
16
-    		'status',
17
-    		'updated_by'
16
+            'status',
17
+            'updated_by'
18 18
     ];
19 19
 
20 20
     //Eloquence Search mapping
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 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
 }
Please login to merge, or discard this patch.
app/Sms_log.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
 
34 34
     public function scopeDashboardLogs($query)
35 35
     {
36
-    	return $query->where('send_time','<=',Carbon::now())->take(5)->orderBy('send_time','desc');
36
+        return $query->where('send_time','<=',Carbon::now())->take(5)->orderBy('send_time','desc');
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     public $timestamps = false;
22 22
     
23
-    protected $dates  = ['send_time'];
23
+    protected $dates = ['send_time'];
24 24
 
25 25
     //Eloquence Search mapping
26 26
     use Eloquence;
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function scopeDashboardLogs($query)
35 35
     {
36
-    	return $query->where('send_time','<=',Carbon::now())->take(5)->orderBy('send_time','desc');
36
+    	return $query->where('send_time', '<=', Carbon::now())->take(5)->orderBy('send_time', 'desc');
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Permission.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 class Permission extends EntrustPermission
8 8
 {
9 9
 
10
-	protected $table = 'permissions';
10
+    protected $table = 'permissions';
11 11
 
12 12
     protected $fillable = [
13
-    		'name',
14
-    		'display_name',
13
+            'name',
14
+            'display_name',
15 15
             'description',
16
-    		'group_key',
16
+            'group_key',
17 17
     ];
18 18
 
19 19
     public function Roles()
Please login to merge, or discard this patch.
app/Luser.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
     protected $table = 'mst_staff';
10 10
 
11 11
     protected $fillable = [
12
-    		'username',
13
-    		'password',
14
-    		'name',
15
-    		'created_by',
16
-    		'updated_by'
12
+            'username',
13
+            'password',
14
+            'name',
15
+            'created_by',
16
+            'updated_by'
17 17
     ];
18 18
 }
Please login to merge, or discard this patch.
app/Followup.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -8,35 +8,35 @@
 block discarded – undo
8 8
 
9 9
 class Followup extends Model
10 10
 {
11
-	protected $table = 'trn_enquiry_followups';
12
-
13
-	protected $fillable = [
14
-		'enquiry_id',
15
-		'followup_by',
16
-		'due_date',
17
-		'status',
18
-		'outcome',
19
-		'created_by',
20
-    	'updated_by',
21
-	];
22
-
23
-	protected $dates  = ['created_at', 'updated_at', 'due_date'];
24
-
25
-	public function Enquiry()
26
-	{
27
-		return $this->belongsTo('App\Enquiry','enquiry_id');
28
-	}
29
-
30
-	public function scopeReminders($query)
31
-	{
32
-		return $query->leftJoin('mst_enquiries','trn_enquiry_followups.enquiry_id','=','mst_enquiries.id')
33
-					 ->select('trn_enquiry_followups.*','mst_enquiries.status')
34
-					 ->where('trn_enquiry_followups.due_date','<=',Carbon::today())
35
-					 ->where('trn_enquiry_followups.status','=',\constFollowUpStatus::Pending)
36
-					 ->where('mst_enquiries.status','=',\constEnquiryStatus::Lead);
37
-	}
38
-
39
-	public function createdBy()
11
+    protected $table = 'trn_enquiry_followups';
12
+
13
+    protected $fillable = [
14
+        'enquiry_id',
15
+        'followup_by',
16
+        'due_date',
17
+        'status',
18
+        'outcome',
19
+        'created_by',
20
+        'updated_by',
21
+    ];
22
+
23
+    protected $dates  = ['created_at', 'updated_at', 'due_date'];
24
+
25
+    public function Enquiry()
26
+    {
27
+        return $this->belongsTo('App\Enquiry','enquiry_id');
28
+    }
29
+
30
+    public function scopeReminders($query)
31
+    {
32
+        return $query->leftJoin('mst_enquiries','trn_enquiry_followups.enquiry_id','=','mst_enquiries.id')
33
+                        ->select('trn_enquiry_followups.*','mst_enquiries.status')
34
+                        ->where('trn_enquiry_followups.due_date','<=',Carbon::today())
35
+                        ->where('trn_enquiry_followups.status','=',\constFollowUpStatus::Pending)
36
+                        ->where('mst_enquiries.status','=',\constEnquiryStatus::Lead);
37
+    }
38
+
39
+    public function createdBy()
40 40
     {
41 41
         return $this->belongsTo('App\User','created_by');
42 42
     }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,29 +20,29 @@
 block discarded – undo
20 20
     	'updated_by',
21 21
 	];
22 22
 
23
-	protected $dates  = ['created_at', 'updated_at', 'due_date'];
23
+	protected $dates = ['created_at', 'updated_at', 'due_date'];
24 24
 
25 25
 	public function Enquiry()
26 26
 	{
27
-		return $this->belongsTo('App\Enquiry','enquiry_id');
27
+		return $this->belongsTo('App\Enquiry', 'enquiry_id');
28 28
 	}
29 29
 
30 30
 	public function scopeReminders($query)
31 31
 	{
32
-		return $query->leftJoin('mst_enquiries','trn_enquiry_followups.enquiry_id','=','mst_enquiries.id')
33
-					 ->select('trn_enquiry_followups.*','mst_enquiries.status')
34
-					 ->where('trn_enquiry_followups.due_date','<=',Carbon::today())
35
-					 ->where('trn_enquiry_followups.status','=',\constFollowUpStatus::Pending)
36
-					 ->where('mst_enquiries.status','=',\constEnquiryStatus::Lead);
32
+		return $query->leftJoin('mst_enquiries', 'trn_enquiry_followups.enquiry_id', '=', 'mst_enquiries.id')
33
+					 ->select('trn_enquiry_followups.*', 'mst_enquiries.status')
34
+					 ->where('trn_enquiry_followups.due_date', '<=', Carbon::today())
35
+					 ->where('trn_enquiry_followups.status', '=', \constFollowUpStatus::Pending)
36
+					 ->where('mst_enquiries.status', '=', \constEnquiryStatus::Lead);
37 37
 	}
38 38
 
39 39
 	public function createdBy()
40 40
     {
41
-        return $this->belongsTo('App\User','created_by');
41
+        return $this->belongsTo('App\User', 'created_by');
42 42
     }
43 43
 
44 44
     public function updatedBy()
45 45
     {
46
-        return $this->belongsTo('App\User','updated_by');
46
+        return $this->belongsTo('App\User', 'updated_by');
47 47
     }
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
app/Member.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -13,35 +13,35 @@  discard block
 block discarded – undo
13 13
 {
14 14
     use HasMediaTrait , Eloquence;
15 15
     
16
-	protected $table = 'mst_members';
17
-
18
-	protected $fillable = [
19
-		'member_code',
20
-		'name',
21
-		'DOB',
22
-		'email',
23
-		'address',
24
-		'status',
25
-		'proof_name',
26
-		'gender',
16
+    protected $table = 'mst_members';
17
+
18
+    protected $fillable = [
19
+        'member_code',
20
+        'name',
21
+        'DOB',
22
+        'email',
23
+        'address',
24
+        'status',
25
+        'proof_name',
26
+        'gender',
27 27
         'contact',
28 28
         'emergency_contact',
29
-		'health_issues',
30
-		'pin_code',
31
-		'occupation',
32
-		'aim',
33
-		'source',
34
-		'created_by',
35
-    	'updated_by'
36
-	];   
29
+        'health_issues',
30
+        'pin_code',
31
+        'occupation',
32
+        'aim',
33
+        'source',
34
+        'created_by',
35
+        'updated_by'
36
+    ];   
37 37
     
38
-	protected $dates  = ['created_at', 'updated_at', 'DOB'];
38
+    protected $dates  = ['created_at', 'updated_at', 'DOB'];
39 39
 
40 40
 
41
-	protected $searchableColumns = [
42
-	    'member_code' => 20,
41
+    protected $searchableColumns = [
42
+        'member_code' => 20,
43 43
         'name' => 20,
44
-	    'email' => 20,
44
+        'email' => 20,
45 45
         'contact' => 20,
46 46
     ];
47 47
 
@@ -49,16 +49,16 @@  discard block
 block discarded – undo
49 49
     public function registerMediaConversions()
50 50
     {
51 51
         $this->addMediaConversion('thumb')
52
-             ->setManipulations(['w' => 50, 'h' => 50, 'q' => 100, 'fit' => 'crop'])
53
-             ->performOnCollections('profile');
52
+                ->setManipulations(['w' => 50, 'h' => 50, 'q' => 100, 'fit' => 'crop'])
53
+                ->performOnCollections('profile');
54 54
 
55 55
         $this->addMediaConversion('form')
56
-             ->setManipulations(['w' => 70, 'h' => 70, 'q' => 100, 'fit' => 'crop'])
57
-             ->performOnCollections('profile','proof');
56
+                ->setManipulations(['w' => 70, 'h' => 70, 'q' => 100, 'fit' => 'crop'])
57
+                ->performOnCollections('profile','proof');
58 58
     }
59 59
 
60 60
     //Relationships
61
-	public function createdBy()
61
+    public function createdBy()
62 62
     {
63 63
         return $this->belongsTo('App\User','created_by');
64 64
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function Subscriptions()
72 72
     {
73
-    	return $this->hasMany('App\Subscription');
73
+        return $this->hasMany('App\Subscription');
74 74
     }
75 75
 
76 76
     public function Invoices()
@@ -108,28 +108,28 @@  discard block
 block discarded – undo
108 108
 
109 109
     public function scopeActive($query)
110 110
     {
111
-       return $query->where('status','=', \constStatus::Active);
111
+        return $query->where('status','=', \constStatus::Active);
112 112
     }
113 113
 
114 114
     public function scopeInactive($query)
115 115
     {
116
-       return $query->where('status','=', \constStatus::InActive);
116
+        return $query->where('status','=', \constStatus::InActive);
117 117
     }
118 118
 
119 119
     public function scopeRecent($query)
120 120
     {
121
-       return $query->where('created_at','<=',Carbon::today())->take(10)->orderBy('created_at','desc');
121
+        return $query->where('created_at','<=',Carbon::today())->take(10)->orderBy('created_at','desc');
122 122
     }
123 123
 
124 124
     public function scopeBirthday($query)
125 125
     {
126
-    	return $query->whereMonth('DOB','=',Carbon::today()->month)->whereDay('DOB','<',Carbon::today()->addDays(7))->whereDay('DOB','>=',Carbon::today()->day)->where('status','=',\constStatus::Active);
126
+        return $query->whereMonth('DOB','=',Carbon::today()->month)->whereDay('DOB','<',Carbon::today()->addDays(7))->whereDay('DOB','>=',Carbon::today()->day)->where('status','=',\constStatus::Active);
127 127
     }
128 128
 
129 129
     // Laravel issue: Workaroud Needed
130 130
     public function scopeRegistrations($query,$month,$year)
131 131
     {
132
-    	return $query->whereMonth('created_at', '=', $month)->whereYear('created_at', '=',$year)->count();
132
+        return $query->whereMonth('created_at', '=', $month)->whereYear('created_at', '=',$year)->count();
133 133
     }
134 134
 
135 135
 }
136 136
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 class Member extends Model implements HasMediaConversions
13 13
 {
14
-    use HasMediaTrait , Eloquence;
14
+    use HasMediaTrait, Eloquence;
15 15
     
16 16
 	protected $table = 'mst_members';
17 17
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     	'updated_by'
36 36
 	];   
37 37
     
38
-	protected $dates  = ['created_at', 'updated_at', 'DOB'];
38
+	protected $dates = ['created_at', 'updated_at', 'DOB'];
39 39
 
40 40
 
41 41
 	protected $searchableColumns = [
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
 
55 55
         $this->addMediaConversion('form')
56 56
              ->setManipulations(['w' => 70, 'h' => 70, 'q' => 100, 'fit' => 'crop'])
57
-             ->performOnCollections('profile','proof');
57
+             ->performOnCollections('profile', 'proof');
58 58
     }
59 59
 
60 60
     //Relationships
61 61
 	public function createdBy()
62 62
     {
63
-        return $this->belongsTo('App\User','created_by');
63
+        return $this->belongsTo('App\User', 'created_by');
64 64
     }
65 65
 
66 66
     public function updatedBy()
67 67
     {
68
-        return $this->belongsTo('App\User','updated_by');
68
+        return $this->belongsTo('App\User', 'updated_by');
69 69
     }
70 70
 
71 71
     public function Subscriptions()
@@ -79,17 +79,17 @@  discard block
 block discarded – undo
79 79
     }
80 80
 
81 81
     //Scope Queries
82
-    public function scopeIndexQuery($query,$sorting_field,$sorting_direction,$drp_start,$drp_end)
82
+    public function scopeIndexQuery($query, $sorting_field, $sorting_direction, $drp_start, $drp_end)
83 83
     {
84 84
         $sorting_field = ($sorting_field != null ? $sorting_field : 'created_at');
85 85
         $sorting_direction = ($sorting_direction != null ? $sorting_direction : 'desc');
86 86
 
87 87
         if ($drp_start == null or $drp_end == null) 
88 88
         {
89
-            return $query->select('mst_members.id','mst_members.member_code','mst_members.name','mst_members.contact','mst_members.created_at','mst_members.status')->where('mst_members.status','!=', \constStatus::Archive)->orderBy($sorting_field,$sorting_direction);
89
+            return $query->select('mst_members.id', 'mst_members.member_code', 'mst_members.name', 'mst_members.contact', 'mst_members.created_at', 'mst_members.status')->where('mst_members.status', '!=', \constStatus::Archive)->orderBy($sorting_field, $sorting_direction);
90 90
         }
91 91
 
92
-        return $query->select('mst_members.id','mst_members.member_code','mst_members.name','mst_members.contact','mst_members.created_at','mst_members.status')->where('mst_members.status','!=', \constStatus::Archive)->whereBetween('mst_members.created_at', [$drp_start, $drp_end])->orderBy($sorting_field,$sorting_direction);
92
+        return $query->select('mst_members.id', 'mst_members.member_code', 'mst_members.name', 'mst_members.contact', 'mst_members.created_at', 'mst_members.status')->where('mst_members.status', '!=', \constStatus::Archive)->whereBetween('mst_members.created_at', [$drp_start, $drp_end])->orderBy($sorting_field, $sorting_direction);
93 93
     }
94 94
 
95 95
 
@@ -108,28 +108,28 @@  discard block
 block discarded – undo
108 108
 
109 109
     public function scopeActive($query)
110 110
     {
111
-       return $query->where('status','=', \constStatus::Active);
111
+       return $query->where('status', '=', \constStatus::Active);
112 112
     }
113 113
 
114 114
     public function scopeInactive($query)
115 115
     {
116
-       return $query->where('status','=', \constStatus::InActive);
116
+       return $query->where('status', '=', \constStatus::InActive);
117 117
     }
118 118
 
119 119
     public function scopeRecent($query)
120 120
     {
121
-       return $query->where('created_at','<=',Carbon::today())->take(10)->orderBy('created_at','desc');
121
+       return $query->where('created_at', '<=', Carbon::today())->take(10)->orderBy('created_at', 'desc');
122 122
     }
123 123
 
124 124
     public function scopeBirthday($query)
125 125
     {
126
-    	return $query->whereMonth('DOB','=',Carbon::today()->month)->whereDay('DOB','<',Carbon::today()->addDays(7))->whereDay('DOB','>=',Carbon::today()->day)->where('status','=',\constStatus::Active);
126
+    	return $query->whereMonth('DOB', '=', Carbon::today()->month)->whereDay('DOB', '<', Carbon::today()->addDays(7))->whereDay('DOB', '>=', Carbon::today()->day)->where('status', '=', \constStatus::Active);
127 127
     }
128 128
 
129 129
     // Laravel issue: Workaroud Needed
130
-    public function scopeRegistrations($query,$month,$year)
130
+    public function scopeRegistrations($query, $month, $year)
131 131
     {
132
-    	return $query->whereMonth('created_at', '=', $month)->whereYear('created_at', '=',$year)->count();
132
+    	return $query->whereMonth('created_at', '=', $month)->whereYear('created_at', '=', $year)->count();
133 133
     }
134 134
 
135 135
 }
136 136
\ No newline at end of file
Please login to merge, or discard this patch.
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.