Test Setup Failed
Pull Request — master (#523)
by Mohamed
09:07
created
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.