@@ -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 | |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | if(!empty($row['admission_no'])){ |
| 165 | 165 | Institution_student::where('student_id','=',$studentInfo->id) |
| 166 | 166 | ->where('institution_id','=', $institution) |
| 167 | - // ->where('academic_period_id','=',$academicPeriod->id) |
|
| 167 | + // ->where('academic_period_id','=',$academicPeriod->id) |
|
| 168 | 168 | ->update(['admission_id'=> $row['admission_no']]); |
| 169 | 169 | } |
| 170 | 170 | if (!empty($row['special_need'])) { |
@@ -82,7 +82,7 @@ |
||
| 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) |
@@ -226,25 +226,25 @@ |
||
| 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 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | public function process($student) |
| 76 | 76 | { |
| 77 | - try{ |
|
| 77 | + try{ |
|
| 78 | 78 | $wrongStudentsClass = Institution_class_student::where('institution_id', $student['institution_id']) |
| 79 | 79 | ->whereRaw('institution_class_id not in (select id from institution_classes where institution_id ='.$student['institution_id'].' )') |
| 80 | 80 | ->orWhere('institution_class_id', 0) |
@@ -142,8 +142,8 @@ discard block |
||
| 142 | 142 | array_walk($institutionClassStudent, array($this->class, 'updateClassCount')); |
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | - }catch(\Exception $e){ |
|
| 145 | + }catch(\Exception $e){ |
|
| 146 | 146 | dd($e); |
| 147 | - } |
|
| 147 | + } |
|
| 148 | 148 | } |
| 149 | 149 | } |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | array_walk($institutionClassStudent, array($this->class, 'updateClassCount')); |
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | - }catch(\Exception $e){ |
|
| 145 | + } catch(\Exception $e){ |
|
| 146 | 146 | dd($e); |
| 147 | 147 | } |
| 148 | 148 | } |
@@ -52,16 +52,16 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public function delete(){ |
| 55 | - try{ |
|
| 56 | - DB::statement("UPDATE student_guardians t1 |
|
| 55 | + try{ |
|
| 56 | + DB::statement("UPDATE student_guardians t1 |
|
| 57 | 57 | INNER JOIN student_guardians t2 |
| 58 | 58 | set t1.deleted_at=now() |
| 59 | 59 | WHERE |
| 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){ |
|
| 64 | - dd($e); |
|
| 65 | - } |
|
| 63 | + }catch(\Exception $e){ |
|
| 64 | + dd($e); |
|
| 65 | + } |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -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 | } |
@@ -288,7 +288,7 @@ |
||
| 288 | 288 | $allSubjects = array_map(array($this, 'setStudentSubjects'), $allSubjects); |
| 289 | 289 | $allSubjects = unique_multidim_array($allSubjects, 'education_subject_id'); |
| 290 | 290 | array_walk($allSubjects, array($this, 'insertSubject')); |
| 291 | - array_walk($allInsSubjects,array($this,'updateSubjectCount')); |
|
| 291 | + array_walk($allInsSubjects,array($this,'updateSubjectCount')); |
|
| 292 | 292 | } |
| 293 | 293 | $output = new \Symfony\Component\Console\Output\ConsoleOutput(); |
| 294 | 294 | $output->writeln('----------------- ' . $student['student_id'] . 'to ' . $class['name']); |