Test Setup Failed
Push — master ( 3a1761...2fc4ab )
by Mohamed
17:58 queued 11:22
created
app/Http/Controllers/ExaminationStudentsController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@
 block discarded – undo
306 306
         // if the same gender same DOE has more than one 
307 307
         if(($doe_students > 1) || ($count > 1)){
308 308
             $studentData = $this->searchSimilarName($student, $sis_users,false);
309
-        }else{
309
+        } else{
310 310
             $studentData = $this->searchSimilarName($student, $sis_users);
311 311
         }   
312 312
         return $studentData;
Please login to merge, or discard this patch.
app/Console/Commands/UpdateStudentsCount.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $func = array($this,'updateCount');
54 54
             array_walk($subjects,array($this,'process'));
55 55
             $this->output->writeln('start updating:'. count($classes));
56
-        }elseif($this->argument('entity') == 'subject'){
56
+        } elseif($this->argument('entity') == 'subject'){
57 57
             $subjects = Institution_subject::get()->toArray(); 
58 58
             $subjects = array_chunk($subjects,10000);
59 59
             $this->output->writeln('start updating:'. count($subjects));
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $func = array($this,'updateCount');
69 69
             processParallel($func,$data,$this->argument('max'));
70 70
             $this->output->writeln('start updating calss count:'. count($data));
71
-        }elseif($this->argument('entity') == 'subject'){
71
+        } elseif($this->argument('entity') == 'subject'){
72 72
             $this->output->writeln('start updating subject count:'. count($data));
73 73
             $func_subject = array($this,'updateSubjectCount');
74 74
             processParallel($func_subject,$data,$this->argument('max'));
Please login to merge, or discard this patch.
app/Http/Controllers/FilesController.php 1 patch
Braces   +19 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,16 +23,15 @@  discard block
 block discarded – undo
23 23
 
24 24
                 if($diff_in_hours >= 2 && $data->is_processed == 3){
25 25
                     return "Terminated";
26
-                }
27
-                elseif ($data->is_processed === 1) {
26
+                } elseif ($data->is_processed === 1) {
28 27
                     return "Success";
29
-                }elseif ($data->is_processed === 2){
28
+                } elseif ($data->is_processed === 2){
30 29
                     return "Failed";
31
-                }elseif($diff_in_hours < 2 && $data->is_processed == 3){
30
+                } elseif($diff_in_hours < 2 && $data->is_processed == 3){
32 31
                     return "Processing";
33
-                }elseif ($data->is_processed == 4){
32
+                } elseif ($data->is_processed == 4){
34 33
                     return "Process Paused";
35
-                }else{
34
+                } else{
36 35
                     return 'Pending';
37 36
                 };
38 37
 
@@ -40,9 +39,9 @@  discard block
 block discarded – undo
40 39
             ->editColumn('is_email_sent', function ($data) {
41 40
                 if ($data->is_email_sent == 1) {
42 41
                     return "Success";
43
-                }elseif($data->is_email_sent == 2 ){
42
+                } elseif($data->is_email_sent == 2 ){
44 43
                     return 'Failed';
45
-                }else{
44
+                } else{
46 45
                     return 'Pending';
47 46
                 };
48 47
 
@@ -50,11 +49,11 @@  discard block
 block discarded – undo
50 49
             ->editColumn('update', function ($data) {
51 50
                 if ((int)$data->update  == 0) {
52 51
                     return "No Processes";
53
-                }elseif((int)$data->update == 1 ){
52
+                } elseif((int)$data->update == 1 ){
54 53
                     return 'Success';
55
-                }elseif((int)$data->update == 2 ){
54
+                } elseif((int)$data->update == 2 ){
56 55
                     return 'Failed';
57
-                }elseif((int)$data->update == 3 ){
56
+                } elseif((int)$data->update == 3 ){
58 57
                     return 'Partial Success';
59 58
                 };
60 59
 
@@ -62,11 +61,11 @@  discard block
 block discarded – undo
62 61
             ->editColumn('insert', function ($data) {
63 62
                 if ($data->insert == 0) {
64 63
                     return "No Processes";
65
-                }elseif($data->insert == 1 ){
64
+                } elseif($data->insert == 1 ){
66 65
                     return 'Success';
67
-                }elseif($data->insert == 2 ){
66
+                } elseif($data->insert == 2 ){
68 67
                     return 'Failed';
69
-                }elseif($data->insert == 3 ){
68
+                } elseif($data->insert == 3 ){
70 69
                     return 'Partial Success';
71 70
                 };
72 71
 
@@ -75,7 +74,7 @@  discard block
 block discarded – undo
75 74
                 if(\App::environment('local') || \App::environment('stage')){
76 75
                     return '<a href="/download_file/'.$data->filename.'">'.$data->classRoom->name.'</a>';
77 76
 
78
-                }else{
77
+                } else{
79 78
                     return '<a href="/bulk-upload/download_file/'.$data->filename.'">'.$data->classRoom->name.'</a>';
80 79
                 }
81 80
 
@@ -84,7 +83,7 @@  discard block
 block discarded – undo
84 83
                 if(\App::environment('local') || \App::environment('stage')){
85 84
                     return '<a href="/download/'.$data->filename.'">'.$data->classRoom->name.'</a>';
86 85
 
87
-                }else{
86
+                } else{
88 87
                     return '<a href="/bulk-upload/download/'.$data->filename.'">'.$data->classRoom->name.'</a>';
89 88
                 }
90 89
 
@@ -97,13 +96,13 @@  discard block
 block discarded – undo
97 96
 
98 97
                 if($diff_in_hours >= 2 && $data->is_processed == 3){
99 98
                     return '<button onclick="updateProcess('.($data->id).',100)" class="btn btn-primary text-uppercase">reprocess</button>';
100
-                }elseif ($data->is_processed == 1){
99
+                } elseif ($data->is_processed == 1){
101 100
                     return '<div><h6>Processing <span class="badge badge-success text-uppercase">Successful</span></h6></div>';
102
-                }elseif ($data->is_processed == 2){
101
+                } elseif ($data->is_processed == 2){
103 102
                     return '<div><h6>Processing <span class="badge badge-danger text-uppercase">Failed</span></h6></div>';
104
-                }elseif ($data->is_processed == 0){
103
+                } elseif ($data->is_processed == 0){
105 104
                     return '<button onclick="updateProcess('.($data->id).',200)" class="btn btn-block btn-warning text-uppercase">pause</button>';
106
-                }elseif ($data->is_processed == 4){
105
+                } elseif ($data->is_processed == 4){
107 106
                     return '<button onclick="updateProcess('.($data->id).',100)" class="btn btn-block btn-success text-uppercase">resume</button>';
108 107
                 }
109 108
             })
Please login to merge, or discard this patch.
app/Console/Commands/RemoveDuplications.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             ->toArray();
52 52
             if(count($duplicatedStudents)>0){
53 53
                 processParallel(array($this,'process'),$duplicatedStudents,10);
54
-            }else{
54
+            } else{
55 55
                 $this->output->writeln('Nothing to Process, all are clean');
56 56
             }
57 57
         } catch (\Throwable $th) {
Please login to merge, or discard this patch.
app/Console/Commands/CleanExamData.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,19 +53,19 @@  discard block
 block discarded – undo
53 53
             ->whereRaw('CHAR_LENGTH(nsid) > 11')
54 54
             ->get()
55 55
             ->toArray();
56
-        }elseif($type == 'duplicate'){
56
+        } elseif($type == 'duplicate'){
57 57
             $students = DB::table('security_users')
58 58
             ->where('updated_from', 'doe')
59 59
             ->get()
60 60
             ->toArray();
61 61
             
62
-        }elseif($type == 'all'){
62
+        } elseif($type == 'all'){
63 63
             $students = DB::table('examination_students')
64 64
             ->where('nsid','<>','')
65 65
             ->whereNotNull('nsid')
66 66
             ->get()
67 67
             ->toArray();
68
-        }elseif($type == 'lock'){
68
+        } elseif($type == 'lock'){
69 69
             $students = DB::table('examination_students')
70 70
             ->whereNotNull('nsid')
71 71
             ->get()
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $students = array_chunk($students, $this->argument('chunk'));
79 79
             $function = array($this, 'process');
80 80
             processParallel($function,$students, $this->argument('max'),$type);
81
-        }else{
81
+        } else{
82 82
             $this->output->writeln('nothing to process, all are cleaned');
83 83
         }   
84 84
         $this->output->writeln('###########################################------Finished cleaning exam records------###########################################');
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function process($students,$count,$type){
88 88
        if($type === 'duplicate'){
89 89
         array_walk($students,array($this,'cleanData'));
90
-       }elseif($type === 'lock'){
90
+       } elseif($type === 'lock'){
91 91
         array_walk($students,array($this,'lockData'));
92 92
        }
93 93
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             Institution_student_admission::where('student_id', $Student->id)->delete();
113 113
             Security_user::where('id', $Student->id)->delete();
114 114
             $this->output->writeln('cleaned:'.  (string)$Student->openemis_no);
115
-        }else{
115
+        } else{
116 116
             
117 117
             Institution_student::where('student_id', $Student->id)->update(['updated_from' => 'doe']);
118 118
             Security_user::where('id', $Student->id)->update(['updated_from' => 'doe']);
Please login to merge, or discard this patch.
app/Console/Commands/ImportStudents.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
             if(env('APP_ENV') == 'stage'){
142 142
                 $query->where('contact_types.contact_option_id', '=', 5)
143 143
                 ->where('contact_types.name', '=', 'TestEmail');
144
-            }else{
144
+            } else{
145 145
                 $query->where('contact_types.contact_option_id', '!=', 5);
146 146
             }
147 147
             
Please login to merge, or discard this patch.
app/Models/Student_guardian.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         if(!$exist){
83 83
             $data['created'] = now();
84 84
             self::create($data);
85
-        }else{
85
+        } else{
86 86
             $data['modified'] = now();
87 87
             self::where('student_id' , $student->student_id)
88 88
             ->where('guardian_relation_id',$guardian->guardian_relation_id)
Please login to merge, or discard this patch.
app/Models/Institution_student.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -226,25 +226,25 @@
 block discarded – undo
226 226
         if(!is_null($father) && is_null($mother) && is_null($guardian)){
227 227
             Security_user::where('id',$student['student_id'])
228 228
             ->update(['address_area_id' => $father->address_area_id]);
229
-        }elseif(!is_null($mother)  && (is_null($father) && is_null($guardian))){
229
+        } elseif(!is_null($mother)  && (is_null($father) && is_null($guardian))){
230 230
             Security_user::where('id',$student['student_id'])
231 231
             ->update(['address_area_id' => $mother->address_area_id]);
232
-        }elseif(!is_null($guardian) && is_null($father) && is_null($mother)){
232
+        } elseif(!is_null($guardian) && is_null($father) && is_null($mother)){
233 233
             Security_user::where('id',$student['student_id'])
234 234
             ->update(['address_area_id' => $guardian->address_area_id]);
235
-        }elseif(!is_null($mother)  && !is_null($father) && ($father->address_area_id ==  $mother->address_area_id)){
235
+        } elseif(!is_null($mother)  && !is_null($father) && ($father->address_area_id ==  $mother->address_area_id)){
236 236
             Security_user::where('id',$student['student_id'])
237 237
             ->update(['address_area_id' => $mother->address_area_id]);
238
-        }elseif(!is_null($mother)  && !is_null($father) && ($father->address_area_id !==  $mother->address_area_id) && !is_null($guardian)){
238
+        } elseif(!is_null($mother)  && !is_null($father) && ($father->address_area_id !==  $mother->address_area_id) && !is_null($guardian)){
239 239
             Security_user::where('id',$student['student_id'])
240 240
             ->update(['address_area_id' => $guardian->address_area_id]);
241
-        }elseif(!is_null($father) && $father->address == $student['address']){
241
+        } elseif(!is_null($father) && $father->address == $student['address']){
242 242
             Security_user::where('id',$student['student_id'])
243 243
             ->update(['address_area_id' => $guardian->address_area_id]);
244
-        }elseif(!is_null($mother) && $mother->address == $student['address']){
244
+        } elseif(!is_null($mother) && $mother->address == $student['address']){
245 245
             Security_user::where('id',$student['student_id'])
246 246
             ->update(['address_area_id' => $mother->address_area_id]);
247
-        }elseif(!is_null($guardian) && $guardian->address == $student['address']){
247
+        } elseif(!is_null($guardian) && $guardian->address == $student['address']){
248 248
             Security_user::where('id',$student['student_id'])
249 249
             ->update(['address_area_id' => $guardian->address_area_id]);
250 250
         }
Please login to merge, or discard this patch.
app/Console/Commands/RemoveDuplicatedGuardians.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
                t1.id > t2.id AND
61 61
                t1.student_id = t2.student_id AND
62 62
                t1.guardian_id = t2.guardian_id");
63
-       }catch(\Exception $e){
63
+       } catch(\Exception $e){
64 64
            dd($e);
65 65
        }
66 66
     }
Please login to merge, or discard this patch.