Test Setup Failed
Pull Request — master (#493)
by Mohamed
09:25
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
             ->where('nsid','<>','')
71 71
             ->whereNotNull('nsid')
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $students = array_chunk($students, $this->argument('chunk'));
80 80
             $function = array($this, 'process');
81 81
             processParallel($function,$students, $this->argument('max'),$type);
82
-        }else{
82
+        } else{
83 83
             $this->output->writeln('nothing to process, all are cleaned');
84 84
         }   
85 85
         $this->output->writeln('###########################################------Finished cleaning exam records------###########################################');
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public function process($students,$count,$type){
89 89
        if($type === 'duplicate'){
90 90
         array_walk($students,array($this,'cleanData'));
91
-       }elseif($type === 'lock'){
91
+       } elseif($type === 'lock'){
92 92
         array_walk($students,array($this,'lockData'));
93 93
        }
94 94
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             Institution_student_admission::where('student_id', $Student->id)->delete();
114 114
             Security_user::where('id', $Student->id)->delete();
115 115
             $this->output->writeln('cleaned:'.  (string)$Student->openemis_no);
116
-        }else{
116
+        } else{
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']);
119 119
         }
Please login to merge, or discard this patch.