Test Setup Failed
Pull Request — master (#486)
by Mohamed
07:25
created
app/Models/Security_user.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -152,12 +152,12 @@
 block discarded – undo
152 152
             ->get()->toArray();
153 153
     }
154 154
 
155
-     /**
156
-     * First level search for students
157
-     *
158
-     * @param array $student
159
-     * @return array
160
-     */
155
+        /**
156
+         * First level search for students
157
+         *
158
+         * @param array $student
159
+         * @return array
160
+         */
161 161
     public function getStudentCount($student)
162 162
     {
163 163
         return $this
Please login to merge, or discard this patch.
app/Exports/ExaminationStudentsExport.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
     }
38 38
     
39 39
     /**
40
-    * @return \Illuminate\Support\Collection
41
-    */
40
+     * @return \Illuminate\Support\Collection
41
+     */
42 42
     public function query()
43 43
     {
44 44
         return Examination_student::query()->whereNotNull('nsid')
Please login to merge, or discard this patch.
app/Console/Commands/ImportStudents.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
             ->join('contact_types', 'user_contacts.contact_type_id', '=', 'contact_types.id')
139 139
             //only for UAT
140 140
             //  ->where('contact_types.contact_option_id', '=', 5)
141
-           ->where('contact_types.contact_option_id', '!=', 5)
141
+            ->where('contact_types.contact_option_id', '!=', 5)
142 142
             //  ->where('contact_types.name', '=', 'TestEmail')
143 143
             ->limit(1)
144 144
             ->get()->toArray();
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
@@ -85,11 +85,11 @@
 block discarded – undo
85 85
 
86 86
     public function process($students){
87 87
         $type = $this->argument('type');
88
-       if($type == 'duplication'){
88
+        if($type == 'duplication'){
89 89
         array_walk($students,array($this,'cleanData'));
90
-       }elseif($type == 'invalid' || 'all'){
90
+        }elseif($type == 'invalid' || 'all'){
91 91
         array_walk($students,array($this,'cleanInvalidData'));
92
-       }
92
+        }
93 93
     }
94 94
 
95 95
 
Please login to merge, or discard this patch.
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.