GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 13526a...f52031 )
by Toby
14:25 queued 11s
created
app/CompletionConditions/NumberOfDocumentsSubmitted.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
     public function percentage($settings, ActivityInstance $activityInstance, ModuleInstance $moduleInstance): int
20 20
     {
21 21
         $count = File::forResource($activityInstance->id, $moduleInstance->id)->count();
22
-        $needed = ( $settings['number_of_files'] ?? 1);
22
+        $needed = ($settings['number_of_files'] ?? 1);
23 23
 
24
-        $percentage = (int) round(($count/$needed) * 100, 0);
24
+        $percentage = (int) round(($count / $needed) * 100, 0);
25 25
 
26
-        if($percentage > 100) {
26
+        if ($percentage > 100) {
27 27
             return 100;
28 28
         }
29 29
         return $percentage;
Please login to merge, or discard this patch.
app/CompletionConditions/NumberOfDocumentsWithStatus.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
         $count = File::forResource($activityInstance->id, $moduleInstance->id())->get()->filter(function(File $file) use ($settings) {
24 24
             return $file->status === $settings['status'];
25 25
         })->count();
26
-        $needed = ( $settings['number_of_files'] ?? 1);
26
+        $needed = ($settings['number_of_files'] ?? 1);
27 27
 
28
-        $percentage = (int) round(($count/$needed) * 100, 0);
28
+        $percentage = (int) round(($count / $needed) * 100, 0);
29 29
 
30
-        if($percentage > 100) {
30
+        if ($percentage > 100) {
31 31
             return 100; 
32 32
         }
33 33
         return $percentage;
Please login to merge, or discard this patch.
app/Http/Controllers/ParticipantApi/FileController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $this->authorize('file.destroy');
54 54
 
55
-        if((int) $file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
55
+        if ((int) $file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
56 56
             throw new AuthorizationException();
57 57
         }
58 58
                 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $this->authorize('file.index');
70 70
 
71
-        if((int) $file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
71
+        if ((int) $file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
72 72
             throw new AuthorizationException();
73 73
         }
74 74
         
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $this->authorize('file.update');
81 81
 
82
-        if((int) $file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
82
+        if ((int) $file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
83 83
             throw new AuthorizationException();
84 84
         }
85 85
         
Please login to merge, or discard this patch.
app/Http/Controllers/ParticipantApi/CommentController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function index(Request $request, Activity $activity, ModuleInstance $moduleInstance, File $file)
22 22
     {
23 23
         $this->authorize('comment.index');
24
-        if ((int)$file->activity_instance_id !== (int)app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
24
+        if ((int) $file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
25 25
             throw new AuthorizationException();
26 26
         }
27 27
         return $file->comments;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->authorize('comment.destroy');
47 47
 
48
-        if ((int)$comment->file->activity_instance_id !== (int)app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
48
+        if ((int) $comment->file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
49 49
             throw new AuthorizationException();
50 50
         }
51 51
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $this->authorize('comment.update');
62 62
 
63
-        if ((int)$comment->file->activity_instance_id !== (int)app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
63
+        if ((int) $comment->file->activity_instance_id !== (int) app(ActivityInstanceResolver::class)->getActivityInstance()->id) {
64 64
             throw new AuthorizationException();
65 65
         }
66 66
 
Please login to merge, or discard this patch.
app/Http/Controllers/Participant/ParticipantPageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         $this->authorize('view-page');
13 13
         
14
-        return view(alias() . '::participant');
14
+        return view(alias().'::participant');
15 15
     }
16 16
     
17 17
 }
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
app/Http/Controllers/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function authorize($ability, $arguments = [])
18 18
     {
19 19
         return $this->baseAuthorize(
20
-            alias() . '.' . $ability,
20
+            alias().'.'.$ability,
21 21
             $arguments
22 22
         );
23 23
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/DownloadFileController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $this->authorize('admin.file.download');
18 18
         
19
-        if(Storage::exists($file->path)) {
19
+        if (Storage::exists($file->path)) {
20 20
             return Storage::download($file->path, $file->filename, [
21 21
                 'X-Vapor-Base64-Encode' => 'True'
22 22
             ]);
Please login to merge, or discard this patch.
app/Http/Controllers/Participant/DownloadFileController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         $this->authorize('file.download');
19 19
         
20
-        if(Storage::exists($file->path)) {
20
+        if (Storage::exists($file->path)) {
21 21
             return Storage::download($file->path, $file->filename, [
22 22
                 'X-Vapor-Base64-Encode' => 'True'
23 23
             ]);
Please login to merge, or discard this patch.
database/factories/FileFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use BristolSU\Module\UploadFile\Models\File;
4 4
 use Faker\Generator as Faker;
5 5
 
6
-$factory->define(File::class, function (Faker $faker) {
6
+$factory->define(File::class, function(Faker $faker) {
7 7
     return [
8 8
         'title' => $faker->sentence,
9 9
         'description' => $faker->sentence,
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
         'uploaded_by' => function() {
15 15
             return factory(\BristolSU\ControlDB\Models\User::class)->create()->id();
16 16
         },
17
-        'module_instance_id' => function () {
17
+        'module_instance_id' => function() {
18 18
             return factory(\BristolSU\Support\ModuleInstance\ModuleInstance::class)->create()->id;
19 19
         },
20
-        'activity_instance_id' => function () {
20
+        'activity_instance_id' => function() {
21 21
             return factory(\BristolSU\Support\ActivityInstance\ActivityInstance::class)->create()->id;
22 22
         },
23 23
         'tags' => $faker->randomElements(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'], 4)
Please login to merge, or discard this patch.