Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — crud-uploads ( b1a998...a2edcc )
by Pedro
13:12
created
src/app/Library/Uploaders/Support/Traits/HandleFileNaming.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
     public FileNameGeneratorInterface $fileNameGenerator;
14 14
 
15
-    public function getFileName(string|UploadedFile|File $file): string
15
+    public function getFileName(string | UploadedFile | File $file): string
16 16
     {
17 17
         if ($this->fileName) {
18 18
             return is_callable($this->fileName) ? ($this->fileName)($file, $this) : $this->fileName;
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $fileGeneratorClass = $fileNameGenerator ?? config('backpack.crud.file_name_generator');
27 27
 
28
-        if (! class_exists($fileGeneratorClass)) {
28
+        if (!class_exists($fileGeneratorClass)) {
29 29
             throw new \Exception("The file name generator class [{$fileGeneratorClass}] does not exist.");
30 30
         }
31 31
 
32
-        if (! in_array(FileNameGeneratorInterface::class, class_implements($fileGeneratorClass, false))) {
32
+        if (!in_array(FileNameGeneratorInterface::class, class_implements($fileGeneratorClass, false))) {
33 33
             throw new \Exception("The file name generator class [{$fileGeneratorClass}] must implement the [".FileNameGeneratorInterface::class.'] interface.');
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/app/Library/Uploaders/Support/FileNameGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class FileNameGenerator implements FileNameGeneratorInterface
11 11
 {
12
-    public function getName(string|UploadedFile|File $file): string
12
+    public function getName(string | UploadedFile | File $file): string
13 13
     {
14 14
         if (is_a($file, File::class, true)) {
15 15
             return $file->getFileName();
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
         return $this->getFileName($file).'.'.$this->getExtensionFromFile($file);
19 19
     }
20 20
 
21
-    private function getExtensionFromFile(string|UploadedFile $file): string
21
+    private function getExtensionFromFile(string | UploadedFile $file): string
22 22
     {
23 23
         return is_a($file, UploadedFile::class, true) ? $file->extension() : Str::after(mime_content_type($file), '/');
24 24
     }
25 25
 
26
-    private function getFileName(string|UploadedFile $file): string
26
+    private function getFileName(string | UploadedFile $file): string
27 27
     {
28 28
         if (is_file($file)) {
29 29
             return Str::of($file->getClientOriginalName())->beforeLast('.')->slug()->append('-'.Str::random(4));
Please login to merge, or discard this patch.