@@ -43,18 +43,18 @@ |
||
43 | 43 | $this->start_time = microtime(TRUE); |
44 | 44 | $this->output = new \Symfony\Component\Console\Output\ConsoleOutput(); |
45 | 45 | $this->output->writeln('############### Starting delete Duplication ################'); |
46 | - $duplicatedStudents = DB::table('institution_students as ins') |
|
47 | - ->select(DB::raw('count(*) as total'),'student_id','id','academic_period_id','education_grade_id') |
|
48 | - ->having('total','>',1) |
|
46 | + $duplicatedStudents = DB::table('institution_students as ins') |
|
47 | + ->select(DB::raw('count(*) as total'), 'student_id', 'id', 'academic_period_id', 'education_grade_id') |
|
48 | + ->having('total', '>', 1) |
|
49 | 49 | ->orderBy('student_id') |
50 | 50 | ->get() |
51 | 51 | ->toArray(); |
52 | - if(count($duplicatedStudents)>0){ |
|
53 | - processParallel(array($this,'process'),$duplicatedStudents,10); |
|
54 | - }else{ |
|
52 | + if (count($duplicatedStudents) > 0) { |
|
53 | + processParallel(array($this, 'process'), $duplicatedStudents, 10); |
|
54 | + }else { |
|
55 | 55 | $this->output->writeln('Nothing to Process, all are clean'); |
56 | 56 | } |
57 | - } catch (\Throwable $th) { |
|
57 | + }catch (\Throwable $th) { |
|
58 | 58 | dd($th); |
59 | 59 | } |
60 | 60 | } |
@@ -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) { |