Test Setup Failed
Branch master (93675a)
by Mohamed
10:31
created
app/Http/Controllers/FilesController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
             ->editColumn('filename', function ($data) {
75 75
                 return '<a href='.env('APP_URL').'/download_file/'.$data->filename.'>'.substr($data->classRoom->name, 0, 10).'</a>';
76 76
             })
77
-             ->editColumn('error', function ($data) {
77
+                ->editColumn('error', function ($data) {
78 78
                 return '<a href='.env('APP_URL').'/download/'.$data->filename.'>'.substr($data->classRoom->name, 0, 10).'</a>';
79 79
             })->editColumn('actions', function ($data) {
80 80
 
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
         $classes = (!Auth::user()->permissions->isEmpty())  ?  Auth::user()->permissions[0]->staff_class : Auth::user()->principal[0]->security_group_institution->institution_classes;
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 
43 43
    
44 44
     /**
45
-    * @return \Illuminate\Support\Collection
46
-    */
45
+     * @return \Illuminate\Support\Collection
46
+     */
47 47
     public function export(Request $request) 
48 48
     {
49
-         $request->validate([
49
+            $request->validate([
50 50
                 'class' => 'required'
51 51
             ]);
52 52
         return Excel::download(new UsersExport($request->input('class')), 'users.xlsx');
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
 
56 56
 
57 57
     /**
58
-    * @return \Illuminate\Support\Collection
59
-    */
58
+     * @return \Illuminate\Support\Collection
59
+     */
60 60
     public function import(Request $request)
61 61
     {
62 62
 
Please login to merge, or discard this patch.
app/Imports/Import.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
 
101 101
             $this->isValidSheet = false;
102 102
             $error = \Illuminate\Validation\ValidationException::withMessages([]);
103
-                       $failure = new Failure(3, 'remark', [0 => 'Template is not valid for upload, use the template given in the system'], [null]);
104
-                       $failures = [0 => $failure];
105
-                       throw new \Maatwebsite\Excel\Validators\ValidationException($error, $failures);
103
+                        $failure = new Failure(3, 'remark', [0 => 'Template is not valid for upload, use the template given in the system'], [null]);
104
+                        $failures = [0 => $failure];
105
+                        throw new \Maatwebsite\Excel\Validators\ValidationException($error, $failures);
106 106
         }
107 107
     }
108 108
 
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
     }
195 195
 
196 196
     protected function checkKeys($key,$count,$row){
197
-       if(array_key_exists($key,$row)){
198
-           return true;
199
-       }else{
197
+        if(array_key_exists($key,$row)){
198
+            return true;
199
+        }else{
200 200
             $error = \Illuminate\Validation\ValidationException::withMessages([]);
201 201
             $failure = new Failure($count, 'remark', [0 => 'Template is not valid for upload, use the template given in the system'. $key ,' Is missing form the template'], [null]);
202 202
             $failures = [0 => $failure];
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      */
217 217
     public function map($row): array {
218 218
         try {
219
-         $row = $this->mapFields($row);
219
+            $row = $this->mapFields($row);
220 220
         } catch (\Maatwebsite\Excel\Validators\ValidationException $e) {
221 221
                 $error = \Illuminate\Validation\ValidationException::withMessages([]);
222 222
                 $failure = new Failure(3, 'remark', [0 => 'Template is not valid for upload, use the template given in the system'], [null]);
Please login to merge, or discard this patch.
app/Imports/StudentImport.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
     }
19 19
 
20 20
     /**
21
-    * @param array $row
22
-    *
23
-    * @return \Illuminate\Database\Eloquent\Model|null
24
-    */
21
+     * @param array $row
22
+     *
23
+     * @return \Illuminate\Database\Eloquent\Model|null
24
+     */
25 25
 
26 26
     public function sheets(): array
27 27
     {
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
      *
26 26
      * @return void
27 27
      */
28
-     public function boot()
29
-     {
30
-         //
31
-         if((\App::environment('dev')) |  (\App::environment('stage')) | (\App::environment('prod'))) {
32
-             URL::forceScheme('https');
33
-         }
34
-     }
28
+        public function boot()
29
+        {
30
+            //
31
+            if((\App::environment('dev')) |  (\App::environment('stage')) | (\App::environment('prod'))) {
32
+                URL::forceScheme('https');
33
+            }
34
+        }
35 35
 }
Please login to merge, or discard this patch.
app/Providers/ValidatorExtended.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -135,13 +135,13 @@
 block discarded – undo
135 135
     }
136 136
     protected function validateNic($attribute, $value, $perameters, $validator){
137 137
         $valid = preg_match('/^([0-9]{9}[VX]|[0-9]{12})$/i', $value);
138
-       if(!$valid){
139
-             $this->_custom_messages['nic'] = $attribute. ' is not valid,  Please check the NIC number';
140
-             $this->_set_custom_stuff();
141
-             return false;
142
-       }else{
143
-           return true;
144
-       }
138
+        if(!$valid){
139
+                $this->_custom_messages['nic'] = $attribute. ' is not valid,  Please check the NIC number';
140
+                $this->_set_custom_stuff();
141
+                return false;
142
+        }else{
143
+            return true;
144
+        }
145 145
     }
146 146
 
147 147
     protected function validateUserUnique($attribute, $value, $perameters, $validator) {
Please login to merge, or discard this patch.
app/Providers/ValidationExtensionServiceProvider.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     public function boot() {
13 13
         $this->app->validator->resolver( function( $translator, $data, $rules,
14
-                                                   $messages = array(), $customAttributes = array() ) {
14
+                                                    $messages = array(), $customAttributes = array() ) {
15 15
             return new ValidatorExtended( $translator, $data, $rules, $messages,
16 16
                 $customAttributes );
17 17
         } );
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Console/Commands/PromoteStudents.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
                 'created_user_id' => $student['created_user_id']
213 213
             ];
214 214
             try{
215
-               Institution_student::where('id',(string)$student['id'])->update($studentData);
215
+                Institution_student::where('id',(string)$student['id'])->update($studentData);
216 216
                 $output = new \Symfony\Component\Console\Output\ConsoleOutput();
217 217
                 $output->writeln('----------------- '. $student['admission_id'] . ' to ' . $studentData['education_grade_id']);
218 218
 
Please login to merge, or discard this patch.