Test Setup Failed
Push — master ( b1a532...1cf3ce )
by
unknown
18:54
created
app/Console/Commands/RunAddStudentsToInstitutions.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -80,41 +80,41 @@
 block discarded – undo
80 80
             $this->count += 1;
81 81
             $this->student = $approvedstudent ;
82 82
             try{
83
-               Institution_student::insert([
84
-                   'student_status_id' => 1,
85
-                   'student_id' => $approvedstudent['student_id'],
86
-                   'education_grade_id' => $approvedstudent['education_grade_id'],
87
-                   'academic_period_id' => $approvedstudent['academic_period_id'],
88
-                   'start_date' => $approvedstudent['start_date'],
89
-                   'start_year' => \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['start_date'])->year , // $approvedstudent['start_date']->format('Y'),
90
-                   'end_date' => $approvedstudent['end_date'],
91
-                   'end_year' =>  \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['end_date'])->year , //$approvedstudent['end_date']->format('Y'),
92
-                   'institution_id' => $approvedstudent['institution_id'],
93
-                   'admission_id' => $approvedstudent['admission_id'],
94
-                   'created_user_id' => $approvedstudent['created_user_id'],
95
-               ]);
83
+                Institution_student::insert([
84
+                    'student_status_id' => 1,
85
+                    'student_id' => $approvedstudent['student_id'],
86
+                    'education_grade_id' => $approvedstudent['education_grade_id'],
87
+                    'academic_period_id' => $approvedstudent['academic_period_id'],
88
+                    'start_date' => $approvedstudent['start_date'],
89
+                    'start_year' => \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['start_date'])->year , // $approvedstudent['start_date']->format('Y'),
90
+                    'end_date' => $approvedstudent['end_date'],
91
+                    'end_year' =>  \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['end_date'])->year , //$approvedstudent['end_date']->format('Y'),
92
+                    'institution_id' => $approvedstudent['institution_id'],
93
+                    'admission_id' => $approvedstudent['admission_id'],
94
+                    'created_user_id' => $approvedstudent['created_user_id'],
95
+                ]);
96 96
 
97
-               if(!is_null($approvedstudent['institution_class_id'])){
98
-                   Institution_class_student::insert([
99
-                       'student_id' => $approvedstudent['student_id'],
100
-                       'institution_class_id' => $approvedstudent['institution_class_id'],
101
-                       'education_grade_id' =>  $approvedstudent['education_grade_id'],
102
-                       'academic_period_id' => $approvedstudent['academic_period_id'],
103
-                       'institution_id' =>$approvedstudent['institution_id'],
104
-                       'student_status_id' => 1,
105
-                       'created_user_id' => $approvedstudent['created_user_id'],
106
-                   ]);
107
-               }
97
+                if(!is_null($approvedstudent['institution_class_id'])){
98
+                    Institution_class_student::insert([
99
+                        'student_id' => $approvedstudent['student_id'],
100
+                        'institution_class_id' => $approvedstudent['institution_class_id'],
101
+                        'education_grade_id' =>  $approvedstudent['education_grade_id'],
102
+                        'academic_period_id' => $approvedstudent['academic_period_id'],
103
+                        'institution_id' =>$approvedstudent['institution_id'],
104
+                        'student_status_id' => 1,
105
+                        'created_user_id' => $approvedstudent['created_user_id'],
106
+                    ]);
107
+                }
108 108
                 $output->writeln('
109 109
         ####################################################
110 110
            Total number of students updated : '.$this->count.'
111 111
         #                                                  #
112 112
         ####################################################' );
113 113
 //        $output->writeln();
114
-           }catch (\Exception $e){
114
+            }catch (\Exception $e){
115 115
 //               echo $e->getMessage();
116
-               $output->writeln( $e->getMessage());
117
-           }
116
+                $output->writeln( $e->getMessage());
117
+            }
118 118
         }
119 119
 
120 120
     }
Please login to merge, or discard this patch.