Test Setup Failed
Pull Request — master (#654)
by Mohamed
06:54
created
app/Models/Education_programmes_next_programme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 use Illuminate\Database\Eloquent\Model;
8 8
 
9 9
 
10
-class Education_programmes_next_programme extends Model  {
10
+class Education_programmes_next_programme extends Model {
11 11
 
12 12
     /**
13 13
      * The database table used by the model.
Please login to merge, or discard this patch.
app/Mail/StudentImportSuccess.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $institution = Institution_class::find($file['institution_class_id']);
25 25
 
26 26
         $this->user = User::find($file['security_user_id']);
27
-        $this->subject = 'SIS Bulk upload: '. $file['subject'] .$institution->institution->code.': '. $institution->name.' ' . date('Y:m:d H:i:s');
27
+        $this->subject = 'SIS Bulk upload: '.$file['subject'].$institution->institution->code.': '.$institution->name.' '.date('Y:m:d H:i:s');
28 28
         $this->from_address = env('MAIL_FROM_ADDRESS');
29 29
         $this->from_name = 'SIS Bulk Uploader';
30 30
         $this->with = [
@@ -45,7 +45,7 @@  discard block
 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)
48
+             ->from($this->from_address, $this->from_name)
49 49
              ->to($this->user->email)
50 50
             ->subject($this->subject)
51 51
             ->with($this->with);
Please login to merge, or discard this patch.
app/Libraries/ShaHash/SHAHasher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function check($value, $hashedValue, array $options = [])
15 15
     {
16
-        return password_verify ($value , $hashedValue);
16
+        return password_verify($value, $hashedValue);
17 17
     }
18 18
 
19 19
 
20 20
     public function make($value, array $options = [])
21 21
     {
22
-        return password_hash($value,PASSWORD_DEFAULT,$options);
22
+        return password_hash($value, PASSWORD_DEFAULT, $options);
23 23
     }
24 24
 
25 25
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function needsRehash($hashedValue, array $options = [])
29 29
     {
30
-        return password_needs_rehash($hashedValue,$options);
30
+        return password_needs_rehash($hashedValue, $options);
31 31
     }
32 32
 
33 33
 
Please login to merge, or discard this patch.
app/Models/Examination_student.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@
 block discarded – undo
52 52
         $value = self::where('st_no', $data['st_no'])->get();
53 53
         if (count($value) > 0) {
54 54
             self::where('st_no', $data['st_no'])->update($data);
55
-        } else {
55
+        }else {
56 56
             self::insert($data);
57 57
         }
58
-        $output->writeln('Student name: ' . ($data['f_name']) . ' has been inserted to the database');
58
+        $output->writeln('Student name: '.($data['f_name']).' has been inserted to the database');
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
app/Http/Middleware/classTeacher.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@
 block discarded – undo
15 15
      */
16 16
     public function handle($request, Closure $next)
17 17
     {
18
-        if($request->user()->super_admin == 1){
18
+        if ($request->user()->super_admin == 1) {
19 19
             return $next($request);
20
-        }elseif ($request->user() && (!($request->user()->permissions->isEmpty()))  && $request->user()->permissions[0]->roles &&  $request->user()->permissions[0]->roles->code === 'HOMEROOM_TEACHER') {
20
+        }elseif ($request->user() && (!($request->user()->permissions->isEmpty())) && $request->user()->permissions[0]->roles && $request->user()->permissions[0]->roles->code === 'HOMEROOM_TEACHER') {
21 21
             return $next($request);
22
-        }elseif($request->user() && (!($request->user()->principal->isEmpty()))  && $request->user()->principal[0]->roles &&  $request->user()->principal[0]->roles->code === 'PRINCIPAL'){
22
+        }elseif ($request->user() && (!($request->user()->principal->isEmpty())) && $request->user()->principal[0]->roles && $request->user()->principal[0]->roles->code === 'PRINCIPAL') {
23 23
             return $next($request);
24
-        }elseif($request->user() && (!($request->user()->zonal_cordinator->isEmpty()))  && $request->user()->zonal_cordinator[0]->roles &&  $request->user()->zonal_cordinator[0]->roles->code === 'PRINCIPAL'){
24
+        }elseif ($request->user() && (!($request->user()->zonal_cordinator->isEmpty())) && $request->user()->zonal_cordinator[0]->roles && $request->user()->zonal_cordinator[0]->roles->code === 'PRINCIPAL') {
25 25
             return $next($request);
26 26
         }
27 27
         return redirect('/login')->with('status', 'Your dont have access for upload data. Please get assign your to the class and try');
Please login to merge, or discard this patch.
app/Http/Controllers/ImportExport.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
     */
35 35
     public function importExportView()
36 36
     {
37
-        if(Auth::user()->super_admin ){
37
+        if (Auth::user()->super_admin) {
38 38
             return view('uploadcsv');
39
-        }else{
40
-            $classes = (!Auth::user()->permissions->isEmpty())  ?  Auth::user()->permissions[0]->staff_class : Auth::user()->principal[0]->security_group_institution->institution_classes;
41
-            return view('importExport')->with('classes',$classes);
39
+        }else {
40
+            $classes = (!Auth::user()->permissions->isEmpty()) ?  Auth::user()->permissions[0]->staff_class : Auth::user()->principal[0]->security_group_institution->institution_classes;
41
+            return view('importExport')->with('classes', $classes);
42 42
         }
43 43
     }
44 44
 
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 
74 74
 
75 75
             $import = new UsersImport();
76
-            try{
76
+            try {
77 77
                 $files = Storage::disk('sis-bulk-data-files')->allFiles();
78
-                Excel::import($import,request()->file('import_file'));
78
+                Excel::import($import, request()->file('import_file'));
79 79
             }catch (\Maatwebsite\Excel\Validators\ValidationException $e) {
80 80
                 $failures = $e->failures();
81 81
 
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardViewsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 class DashboardViewsController extends Controller
9 9
 {
10 10
     
11
-    public function callback(){
11
+    public function callback() {
12 12
         
13 13
         /** Total number of students by institutions
14 14
          *  In Grafana query to get total students count 
Please login to merge, or discard this patch.
app/Imports/ExaminationStudentsImport.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 use Maatwebsite\Excel\Concerns\WithBatchInserts;
19 19
 use Maatwebsite\Excel\Concerns\WithChunkReading;
20 20
 
21
-class ExaminationStudentsImport implements ToModel, WithStartRow, WithHeadingRow, WithChunkReading, WithBatchInserts , WithValidation ,WithMapping, SkipsOnFailure, SkipsOnError
21
+class ExaminationStudentsImport implements ToModel, WithStartRow, WithHeadingRow, WithChunkReading, WithBatchInserts, WithValidation, WithMapping, SkipsOnFailure, SkipsOnError
22 22
 {
23
-    use Importable , SkipsFailures, SkipsErrors;
23
+    use Importable, SkipsFailures, SkipsErrors;
24 24
 
25 25
     /**
26 26
      * @return int
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 
58 58
     private function transformDateTime(string $value, string $format = 'm/d/Y')
59 59
     {
60
-        try{
60
+        try {
61 61
             $date = date_create_from_format('m/d/Y', $value);
62
-            if(gettype($date)=='boolean'){
62
+            if (gettype($date) == 'boolean') {
63 63
                 $date = date_create_from_format('Y-m-d', $value);
64 64
             }
65 65
             $date = date_format($date, 'Y-m-d');
66 66
             return  $date;
67
-        }catch(\Exception $e){
67
+        }catch (\Exception $e) {
68 68
             $error = \Illuminate\Validation\ValidationException::withMessages([]);
69 69
             $failure = new Failure(2, 'remark', [0 => 'The given date is wrong']);
70 70
             $failures = [0 => $failure];
Please login to merge, or discard this patch.
app/Jobs/NotifyUserCompleteExport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@
 block discarded – undo
30 30
      */
31 31
     public function handle()
32 32
     {
33
-        try{
33
+        try {
34 34
             ini_set('memory_limit', '-1');
35 35
             (new ExaminationStudentsExport)->queue('/examination/student_data_with_nsid.csv')->chain([
36 36
                 (new ExportReady($this->user))
37 37
             ]);
38 38
             
39
-        }catch(\Exception $e){
39
+        }catch (\Exception $e) {
40 40
             $output = new \Symfony\Component\Console\Output\ConsoleOutput();
41 41
             $output->writeln($e->getMessage());
42 42
         }
Please login to merge, or discard this patch.