Test Setup Failed
Push — master ( 88ad80...dd7f24 )
by Mohamed
13:08 queued 06:21
created
app/Models/Institution_subject_student.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,21 +70,21 @@
 block discarded – undo
70 70
      */
71 71
     public static function  isDuplicated($inputs){
72 72
 
73
-       $exists = self::where('student_id','=',$inputs['student_id'])
74
-           ->where('institution_subject_id','=',$inputs['institution_subject_id'])
75
-           ->where('education_subject_id','=',$inputs['education_subject_id'])->count();
73
+        $exists = self::where('student_id','=',$inputs['student_id'])
74
+            ->where('institution_subject_id','=',$inputs['institution_subject_id'])
75
+            ->where('education_subject_id','=',$inputs['education_subject_id'])->count();
76 76
 
77 77
 
78 78
         return $exists ? true :false;
79 79
     }
80 80
 
81 81
     
82
-     public function student(){
82
+        public function student(){
83 83
         return $this->belongsTo('App\Models\Security_user','student_id');
84 84
     }
85 85
     
86 86
     public static function getStudentsCount($institution_subject_id){
87
-         $total_male_students = self::with(['student' => function($query) {
87
+            $total_male_students = self::with(['student' => function($query) {
88 88
                         $query->where('student.gender_id', '=', 1);
89 89
                     }])->whereHas('student', function ($query) {
90 90
                     $query->where('gender_id', '=', 1);
Please login to merge, or discard this patch.
app/Models/Unique_user_id.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public  function updateOrInsertRecord($user)
56 56
     {
57
-       try {
57
+        try {
58 58
             // regenerate unique id if it's not available
59 59
         $uniqueId =  $this->uniqueUserId::isValidUniqueId($user['openemis_no'],9) ? $this->uniqueUserId::getUniqueAlphanumeric() : $user['openemis_no'];
60 60
 
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
             ]);
70 70
         }
71 71
         return $user;
72
-       } catch (\Exception $th) {
72
+        } catch (\Exception $th) {
73 73
             Log::error($th->getMessage());
74
-           $user['openemis_no'] = $this->uniqueUserId::getUniqueAlphanumeric();
75
-           $this->updateOrInsertRecord($user);
76
-       }
74
+            $user['openemis_no'] = $this->uniqueUserId::getUniqueAlphanumeric();
75
+            $this->updateOrInsertRecord($user);
76
+        }
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
app/Console/Commands/CleanExamData.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@
 block discarded – undo
86 86
     }
87 87
 
88 88
     public function process($students,$count,$type){
89
-       if($type === 'duplicate'){
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
     }
95 95
 
96 96
     public function lockData($Student){
Please login to merge, or discard this patch.
app/Imports/StudentUpdate.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
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'])) {
Please login to merge, or discard this patch.
app/Console/Commands/UpdateClassEntriyWithZeroId.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/Console/Commands/RemoveDuplicatedGuardians.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,16 +52,16 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/Http/Controllers/CloneController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     public function array_walk($shift, $count, $params)
42 42
     {
43 43
         try{
44
-           DB::beginTransaction();
44
+            DB::beginTransaction();
45 45
             array_walk($shift, array($this, 'process'), $params);
46 46
             DB::commit();
47 47
         }catch(\Exception $e){
Please login to merge, or discard this patch.