@@ -51,7 +51,7 @@ |
||
| 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) { |
@@ -53,19 +53,19 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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']); |
@@ -141,7 +141,7 @@ |
||
| 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 | |
@@ -60,7 +60,7 @@ |
||
| 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 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | if(count($shift) > 0){ |
| 67 | 67 | // processParallel($function,$shift, $this->argument('max'),$params); |
| 68 | 68 | array_walk($shift,$function,$params); |
| 69 | - }else{ |
|
| 69 | + } else{ |
|
| 70 | 70 | $this->output->writeln('Nothing to clone'); |
| 71 | 71 | } |
| 72 | 72 | $this->end_time = microtime(TRUE); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | if($year == '2019' || $year == '2018/19'){ |
| 59 | 59 | die('Academic Year 2019 or earlier can`t be deleted'); |
| 60 | - }else{ |
|
| 60 | + } else{ |
|
| 61 | 61 | $this->clone->cleanConfig($params); |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | DB::beginTransaction(); |
| 45 | 45 | array_walk($shift, array($this, 'process'), $params); |
| 46 | 46 | DB::commit(); |
| 47 | - }catch(\Exception $e){ |
|
| 47 | + } catch(\Exception $e){ |
|
| 48 | 48 | $this->output->writeln('Terminating ' . $shift['institution_id']); |
| 49 | 49 | DB::rollBack(); |
| 50 | 50 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | ]; |
| 57 | 57 | if(in_array($mode,['AL','1-5','SP','6-11'])){ |
| 58 | 58 | array_walk($institutions,array($this,'callPromotion'),$params); |
| 59 | - }else{ |
|
| 59 | + } else{ |
|
| 60 | 60 | die('The give mode not support'); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | $this->output->writeln("student record :".$student['student_id'] ); |
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | - }catch(\Exception $e){ |
|
| 146 | + } catch(\Exception $e){ |
|
| 147 | 147 | dd($e); |
| 148 | 148 | } |
| 149 | 149 | } |