Test Setup Failed
Pull Request — master (#486)
by Mohamed
07:25
created
app/Models/User.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
 
72 72
     public function permissions(){
73 73
         return $this->hasMany('App\Models\Security_group_user','security_user_id','id')
74
-             ->where('security_group_users.security_role_id','=',5)
75
-             ->with(['security_group_institution','institution_staff','security_group'  , 'staff_class','institution_group' , 'roles']);
74
+                ->where('security_group_users.security_role_id','=',5)
75
+                ->with(['security_group_institution','institution_staff','security_group'  , 'staff_class','institution_group' , 'roles']);
76 76
     }
77 77
 
78 78
     public function principal(){
Please login to merge, or discard this patch.
app/Mail/StudentImportSuccess.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
     public function build()
46 46
     {
47 47
         return $this->view('emails.mail')
48
-             ->from($this->from_address,$this->from_name)
49
-             ->to($this->user->email)
48
+                ->from($this->from_address,$this->from_name)
49
+                ->to($this->user->email)
50 50
             ->subject($this->subject)
51 51
             ->with($this->with);
52 52
     }
Please login to merge, or discard this patch.
app/Mail/IncorrectTemplate.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 {
12 12
     use Queueable, SerializesModels;
13 13
 
14
-     /**
15
-     * Create a new message instance.
16
-     *
17
-     * @return void
18
-     */
14
+        /**
15
+         * Create a new message instance.
16
+         *
17
+         * @return void
18
+         */
19 19
     public function __construct($file)
20 20
     {
21 21
 
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
 }
24 24
 
25 25
 function clean($string) {
26
-   $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
26
+    $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
27 27
 
28
-   return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
28
+    return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
29 29
 }
30 30
 
31 31
 
Please login to merge, or discard this patch.
app/Http/Controllers/ImportExport.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 
30 30
     }
31 31
 
32
-     /**
33
-    * @return \Illuminate\Support\Collection
34
-    */
32
+        /**
33
+         * @return \Illuminate\Support\Collection
34
+         */
35 35
     public function importExportView()
36 36
     {
37 37
         if(Auth::user()->super_admin ){
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 
46 46
    
47 47
     /**
48
-    * @return \Illuminate\Support\Collection
49
-    */
48
+     * @return \Illuminate\Support\Collection
49
+     */
50 50
     public function export(Request $request) 
51 51
     {
52
-         $request->validate([
52
+            $request->validate([
53 53
                 'class' => 'required'
54 54
             ]);
55 55
         return Excel::download(new UsersExport($request->input('class')), 'users.xlsx');
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 
59 59
 
60 60
     /**
61
-    * @return \Illuminate\Support\Collection
62
-    */
61
+     * @return \Illuminate\Support\Collection
62
+     */
63 63
     public function import(Request $request)
64 64
     {
65 65
 
Please login to merge, or discard this patch.
app/Http/Controllers/CloneController.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 class CloneController extends Controller
18 18
 {
19
-  /**
19
+    /**
20 20
      * Create a new command instance.
21 21
      *
22 22
      * @return void
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         $this->output->writeln('cleaned subjects');
55 55
 
56 56
         do{
57
-          $deleted =  $this->institution_subjects->where('academic_period_id',$academicPeriod->id)->limit(100000)->delete();
58
-          $this->output->writeln('100000 institutions cleaned shifts');
57
+            $deleted =  $this->institution_subjects->where('academic_period_id',$academicPeriod->id)->limit(100000)->delete();
58
+            $this->output->writeln('100000 institutions cleaned shifts');
59 59
         }while($deleted > 0);
60 60
     }
61 61
 
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 
87 87
                 }catch (\Exception $e){
88 88
                     dd($e);
89
-                     Log::error($e->getMessage(),[$e]);
89
+                        Log::error($e->getMessage(),[$e]);
90 90
                 }
91 91
             }
92 92
 //            DB::commit();
93 93
         }catch (\Exception $e){
94 94
 //            DB::rollBack();
95
-             Log::error($e->getMessage(),[$e]);
95
+                Log::error($e->getMessage(),[$e]);
96 96
         }
97 97
     }
98 98
 
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
      * @param $academicPeriod
104 104
      */
105 105
     public function insertInstitutionSubjects($subjects, $count,$academicPeriod){
106
-       try{
107
-           $subjects['academic_period_id'] = $academicPeriod->id;
108
-           $subjects['created'] = now();
109
-           unset($subjects['total_male_students']);
110
-           unset($subjects['total_female_students']);
111
-           unset($subjects['id']);
112
-           $this->institution_subjects->create($subjects);
113
-       }catch (\Exception $e){
106
+        try{
107
+            $subjects['academic_period_id'] = $academicPeriod->id;
108
+            $subjects['created'] = now();
109
+            unset($subjects['total_male_students']);
110
+            unset($subjects['total_female_students']);
111
+            unset($subjects['id']);
112
+            $this->institution_subjects->create($subjects);
113
+        }catch (\Exception $e){
114 114
             Log::error($e->getMessage(),[$e]);
115
-       }
115
+        }
116 116
     }
117 117
 
118 118
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 $this->insertInstitutionClassSubjects($institutionSubjects,$class);
155 155
 //                array_walk($classSubjects,array($this,'insertInstitutionClassSubjects'),$params);
156 156
             }catch (\Exception $e){
157
-                 Log::error($e->getMessage(),[$e]);
157
+                    Log::error($e->getMessage(),[$e]);
158 158
             }
159 159
     }
160 160
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 array_walk($subjects,array($this,'insertClassSubjects'),$class);
165 165
                 $this->output->writeln('updating subjects '. $class->name);
166 166
             }catch (\Exception $e){
167
-                 Log::error($e->getMessage(),[$e]);
167
+                    Log::error($e->getMessage(),[$e]);
168 168
             }
169 169
         };
170 170
     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 $this->institution_class_subjects->create($subjectobj);
184 184
             }
185 185
         }catch (\Exception $e){
186
-             Log::error($e->getMessage(),[$e]);
186
+                Log::error($e->getMessage(),[$e]);
187 187
         }
188 188
     }
189 189
 
Please login to merge, or discard this patch.
app/Http/Controllers/FilesController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
                 }
81 81
 
82 82
             })
83
-             ->editColumn('error', function ($data) {
83
+                ->editColumn('error', function ($data) {
84 84
                 if(\App::environment('local') || \App::environment('stage')){
85 85
                     return '<a href="/download/'.$data->filename.'">'.$data->classRoom->name.'</a>';
86 86
 
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardViewsController.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
          * `select total from students_count_view  where institution_id = $id`
16 16
          * `select male from students_count_view  where institution_id = $id`
17 17
          * `select female from students_count_view  where institution_id = $id`
18
-        **/
18
+         **/
19 19
         DashboardViews::createOrUpdateStudentCount();
20 20
 
21 21
         /**
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
          */
49 49
         DashboardViews::createOrUpdateStudentsCountByGrade();
50 50
 
51
-         /**
52
-         * Students count by BMI
53
-         * select * from students_count_by_bmi_view where institution_id = $id
54
-         */
51
+            /**
52
+             * Students count by BMI
53
+             * select * from students_count_by_bmi_view where institution_id = $id
54
+             */
55 55
         DashboardViews::createOrUpdateStudentCountByBMI();
56 56
 
57 57
         /**
Please login to merge, or discard this patch.
app/Console/Commands/UpdateStudentsCount.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
      */
28 28
     protected $description = 'Update the students count male/female';
29 29
 
30
-      /**
31
-     * Create a new command instance.
32
-     *
33
-     * @return void
34
-     */
30
+        /**
31
+         * Create a new command instance.
32
+         *
33
+         * @return void
34
+         */
35 35
     public function __construct()
36 36
     {
37 37
         parent::__construct();
Please login to merge, or discard this patch.