Test Setup Failed
Pull Request — master (#461)
by Mohamed
11:33 queued 04:16
created
app/Models/Area_administrative.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 
7
-class Area_administrative extends Model  {
7
+class Area_administrative extends Model {
8 8
 
9 9
     /**
10 10
      * The database table used by the model.
Please login to merge, or discard this patch.
app/Models/Institution.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     protected $dates = ['date_opened', 'date_closed', 'modified', 'created'];
43 43
 
44 44
     public function isActive($id){
45
-       return  self::query()->find($id)->get()->first()->institution_status_id == 1;
45
+        return  self::query()->find($id)->get()->first()->institution_status_id == 1;
46 46
     }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 
7
-class Institution extends Model  {
7
+class Institution extends Model {
8 8
 
9 9
     /**
10 10
      * The database table used by the model.
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     protected $dates = ['date_opened', 'date_closed', 'modified', 'created'];
43 43
 
44
-    public function isActive($id){
44
+    public function isActive($id) {
45 45
        return  self::query()->find($id)->get()->first()->institution_status_id == 1;
46 46
     }
47 47
 
Please login to merge, or discard this patch.
app/Models/User.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
 
72 72
     public function permissions(){
73 73
         return $this->hasMany('App\Models\Security_group_user','security_user_id','id')
74
-             ->where('security_group_users.security_role_id','=',5)
75
-             ->with(['security_group_institution','institution_staff','security_group'  , 'staff_class','institution_group' , 'roles']);
74
+                ->where('security_group_users.security_role_id','=',5)
75
+                ->with(['security_group_institution','institution_staff','security_group'  , 'staff_class','institution_group' , 'roles']);
76 76
     }
77 77
 
78 78
     public function principal(){
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 use Laravel\Passport\HasApiTokens;
8 8
 
9 9
 
10
-class User extends Authenticatable   {
10
+class User extends Authenticatable {
11 11
 
12 12
     use HasApiTokens, Notifiable;
13 13
 
@@ -69,32 +69,32 @@  discard block
 block discarded – undo
69 69
     protected $dates = ['email_verified_at'];
70 70
 
71 71
 
72
-    public function permissions(){
73
-        return $this->hasMany('App\Models\Security_group_user','security_user_id','id')
74
-             ->where('security_group_users.security_role_id','=',5)
75
-             ->with(['security_group_institution','institution_staff','security_group'  , 'staff_class','institution_group' , 'roles']);
72
+    public function permissions() {
73
+        return $this->hasMany('App\Models\Security_group_user', 'security_user_id', 'id')
74
+             ->where('security_group_users.security_role_id', '=', 5)
75
+             ->with(['security_group_institution', 'institution_staff', 'security_group', 'staff_class', 'institution_group', 'roles']);
76 76
     }
77 77
 
78
-    public function principal(){
79
-        return $this->hasMany('App\Models\Security_group_user','security_user_id','id')
80
-            ->where('security_group_users.security_role_id','=',4)
81
-            ->with(['security_group_institution','institution_staff','security_group'  , 'staff_class','institution_group' , 'roles']);
78
+    public function principal() {
79
+        return $this->hasMany('App\Models\Security_group_user', 'security_user_id', 'id')
80
+            ->where('security_group_users.security_role_id', '=', 4)
81
+            ->with(['security_group_institution', 'institution_staff', 'security_group', 'staff_class', 'institution_group', 'roles']);
82 82
     }
83 83
 
84
-    public function zonal_cordinator(){
85
-        return $this->hasMany('App\Models\Security_group_user','security_user_id','id')
86
-            ->where('security_group_users.security_role_id','=',3)
87
-            ->with(['security_group_institution','institution_staff','security_group'  , 'staff_class','institution_group' , 'roles']);
84
+    public function zonal_cordinator() {
85
+        return $this->hasMany('App\Models\Security_group_user', 'security_user_id', 'id')
86
+            ->where('security_group_users.security_role_id', '=', 3)
87
+            ->with(['security_group_institution', 'institution_staff', 'security_group', 'staff_class', 'institution_group', 'roles']);
88 88
     }
89 89
 
90 90
 
91
-    public function institution_class_teacher(){
92
-        return $this->hasMany('App\Models\Institution_staff','staff_id','id')
91
+    public function institution_class_teacher() {
92
+        return $this->hasMany('App\Models\Institution_staff', 'staff_id', 'id')
93 93
             ->with(['staff_class']);
94 94
     }
95 95
 
96
-    public function teacher_classes(){
97
-        return $this->hasMany('App\Models\Institution_class','staff_id','id');
96
+    public function teacher_classes() {
97
+        return $this->hasMany('App\Models\Institution_class', 'staff_id', 'id');
98 98
     }
99 99
 
100 100
     public function findForPassport($username) {
Please login to merge, or discard this patch.
app/Models/Security_group_institution.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 
7
-class Security_group_institution extends Model  {
7
+class Security_group_institution extends Model {
8 8
 
9 9
 
10 10
     /**
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
 
45 45
 
46 46
 
47
-    public function institution(){
48
-        return $this->belongsTo('App\Models\Institution','institution_id');
47
+    public function institution() {
48
+        return $this->belongsTo('App\Models\Institution', 'institution_id');
49 49
     }
50 50
 
51
-    public function institution_classes(){
52
-        return $this->hasMany('App\Models\Institution_class','institution_id','institution_id');
51
+    public function institution_classes() {
52
+        return $this->hasMany('App\Models\Institution_class', 'institution_id', 'institution_id');
53 53
     }
54 54
 
55
-    public function security_group(){
56
-        return $this->belongsTo('App\Models\Security_group','security_group_id');
55
+    public function security_group() {
56
+        return $this->belongsTo('App\Models\Security_group', 'security_group_id');
57 57
     }
58 58
 
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
app/Models/Student_guardian.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use App\Models\Base_Model;
7 7
 use Webpatser\Uuid\Uuid;
8 8
 
9
-class Student_guardian extends Base_Model  {
9
+class Student_guardian extends Base_Model {
10 10
 
11 11
 
12 12
     public const CREATED_AT = 'created';
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
     public static function boot()
56 56
     {
57 57
         parent::boot();
58
-        self::creating(function ($model) {
58
+        self::creating(function($model) {
59 59
             $model->id = (string) Uuid::generate(4);
60 60
             $model->created_user_id = 1;
61 61
         });
62 62
     }
63 63
 
64
-    public static function createStudentGuardian($student,$guardian,$user){
64
+    public static function createStudentGuardian($student, $guardian, $user) {
65 65
      
66 66
         $data = [
67 67
             'student_id' => $student->student_id,
Please login to merge, or discard this patch.
app/Models/Import_mapping.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 
7
-class Import_mapping extends Model  {
7
+class Import_mapping extends Model {
8 8
 
9 9
     /**
10 10
      * The database table used by the model.
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     protected $dates = [];
43 43
 
44 44
 
45
-    public static  function getSheetColumns($model = null){
45
+    public static  function getSheetColumns($model = null) {
46 46
         $columns = Import_mapping::where('model', '=', $model)
47 47
             ->orderBy('order')
48 48
             ->get()->toArray();
Please login to merge, or discard this patch.
app/Models/Education_programmes_next_programme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 use Illuminate\Database\Eloquent\Model;
8 8
 
9 9
 
10
-class Education_programmes_next_programme extends Model  {
10
+class Education_programmes_next_programme extends Model {
11 11
 
12 12
     /**
13 13
      * The database table used by the model.
Please login to merge, or discard this patch.
app/Mail/StudentImportSuccess.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
     public function build()
46 46
     {
47 47
         return $this->view('emails.mail')
48
-             ->from($this->from_address,$this->from_name)
49
-             ->to($this->user->email)
48
+                ->from($this->from_address,$this->from_name)
49
+                ->to($this->user->email)
50 50
             ->subject($this->subject)
51 51
             ->with($this->with);
52 52
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $institution = Institution_class::find($file['institution_class_id']);
25 25
 
26 26
         $this->user = User::find($file['security_user_id']);
27
-        $this->subject = 'SIS Bulk upload: '. $file['subject'] .$institution->institution->code.': '. $institution->name.' ' . date('Y:m:d H:i:s');
27
+        $this->subject = 'SIS Bulk upload: '.$file['subject'].$institution->institution->code.': '.$institution->name.' '.date('Y:m:d H:i:s');
28 28
         $this->from_address = env('MAIL_FROM_ADDRESS');
29 29
         $this->from_name = 'SIS Bulk Uploader';
30 30
         $this->with = [
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function build()
46 46
     {
47 47
         return $this->view('emails.mail')
48
-             ->from($this->from_address,$this->from_name)
48
+             ->from($this->from_address, $this->from_name)
49 49
              ->to($this->user->email)
50 50
             ->subject($this->subject)
51 51
             ->with($this->with);
Please login to merge, or discard this patch.
app/Mail/IncorrectTemplate.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 {
12 12
     use Queueable, SerializesModels;
13 13
 
14
-     /**
15
-     * Create a new message instance.
16
-     *
17
-     * @return void
18
-     */
14
+        /**
15
+         * Create a new message instance.
16
+         *
17
+         * @return void
18
+         */
19 19
     public function __construct($file)
20 20
     {
21 21
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
23 23
 
24 24
 
25 25
         $this->user = User::find($file['security_user_id']);
26
-        $this->subject = 'SIS Bulk Upload: IncorrectTemplate'.$institution->institution->code.': '. $institution->name.' '. date('Y:m:d H:i:s');
26
+        $this->subject = 'SIS Bulk Upload: IncorrectTemplate'.$institution->institution->code.': '.$institution->name.' '.date('Y:m:d H:i:s');
27 27
         $this->from_address = env('MAIL_FROM_ADDRESS');
28 28
         $this->from_name = 'SIS Bulk Uploader';
29 29
         $this->with = [
30 30
             'name' => $this->user->first_name,
31
-            'link' => \App::environment('local') || \App::environment('stage')  ?  env('APP_URL').'/download/' .$file['filename'] : env('APP_URL').'/bulk-upload/download/' .$file['filename']
31
+            'link' => \App::environment('local') || \App::environment('stage') ?  env('APP_URL').'/download/'.$file['filename'] : env('APP_URL').'/bulk-upload/download/'.$file['filename']
32 32
         ];
33 33
         $this->viewData = [
34 34
             'name'=>$this->user->first_name, "body" => "The Template you used for upload having some issues, please reconfirm and re-upload with correct template",
35
-            'link' =>  \App::environment('local') || \App::environment('stage')   ?  env('APP_URL').'/download/' .$file['filename'] : env('APP_URL').'/bulk-upload/download/' .$file['filename']
35
+            'link' =>  \App::environment('local') || \App::environment('stage') ?  env('APP_URL').'/download/'.$file['filename'] : env('APP_URL').'/bulk-upload/download/'.$file['filename']
36 36
         ];
37 37
     }
38 38
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function build()
45 45
     {
46 46
         return $this->view('emails.mail')
47
-            ->from($this->from_address,$this->from_name)
47
+            ->from($this->from_address, $this->from_name)
48 48
             ->to($this->user->email)
49 49
             ->subject($this->subject)
50 50
             ->with($this->with);
Please login to merge, or discard this patch.