Passed
Pull Request — main (#36)
by
unknown
04:47
created
database/migrations/2023_05_09_090229_create_temporary_uploads_table.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
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('temporary_uploads', function (Blueprint $table) {
11
+        Schema::create('temporary_uploads', function(Blueprint $table) {
12 12
             $table->id();
13 13
             $table->string('session_id');
14 14
             $table->timestamps();
Please login to merge, or discard this patch.
modules/medialibrarypro/src/Actions/ConvertLivewireUploadToMediaAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $temporaryUpload = $temporaryUploadModelClass::createForFile(
38 38
             $uploadedFile,
39 39
             session()->getId(),
40
-            (string)Str::uuid(),
40
+            (string) Str::uuid(),
41 41
             $livewireUpload->getClientOriginalName()
42 42
         );
43 43
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $livewireDisk = config('livewire.temporary_file_upload.disk', 's3');
53 53
 
54 54
         $livewireDirectory = FileUploadConfiguration::directory();
55
-        $remotePath = Str::of($livewireDirectory)->start('/')->finish('/') . $livewireUpload->getFilename();
55
+        $remotePath = Str::of($livewireDirectory)->start('/')->finish('/').$livewireUpload->getFilename();
56 56
 
57 57
         $temporaryUpload = $temporaryUploadModelClass::createForRemoteFile(
58 58
             $remotePath,
Please login to merge, or discard this patch.
payload/modules/medialibrarypro/src/Models/TemporaryUpload.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function registerMediaConversions(Media $media = null): void
36 36
     {
37
-        if (! config('media-library.generate_thumbnails_for_temporary_uploads')) {
37
+        if (!config('media-library.generate_thumbnails_for_temporary_uploads')) {
38 38
             return;
39 39
         }
40 40
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     protected function getPreviewManipulation(): Closure
56 56
     {
57
-        return static::$manipulatePreview ?? function (Conversion $conversion) {
57
+        return static::$manipulatePreview ?? function(Conversion $conversion) {
58 58
             $conversion->fit(Manipulations::FIT_CROP, 300, 300);
59 59
         };
60 60
     }
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
             ->where('uuid', $mediaUuid)
74 74
             ->first();
75 75
 
76
-        if (! $media) {
76
+        if (!$media) {
77 77
             return null;
78 78
         }
79 79
 
80 80
         $temporaryUpload = $media->model;
81 81
 
82
-        if (! $temporaryUpload instanceof TemporaryUpload) {
82
+        if (!$temporaryUpload instanceof TemporaryUpload) {
83 83
             return null;
84 84
         }
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     public static function findByMediaUuidInCurrentSession(?string $mediaUuid): ?TemporaryUpload
90 90
     {
91
-        if (! $temporaryUpload = static::findByMediaUuid($mediaUuid)) {
91
+        if (!$temporaryUpload = static::findByMediaUuid($mediaUuid)) {
92 92
             return null;
93 93
         }
94 94
 
Please login to merge, or discard this patch.
payload/modules/medialibrarypro/src/Request/UploadRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
             'name' => '',
22 22
             'custom_properties' => '',
23 23
             'file' => [
24
-                'max:' . config('media-library.max_file_size') / 1024,
25
-                "mimes:" . $allowedExtensionsString,
24
+                'max:'.config('media-library.max_file_size') / 1024,
25
+                "mimes:".$allowedExtensionsString,
26 26
                 new FileExtensionRule($allowedExtensions),
27 27
             ],
28 28
         ];
Please login to merge, or discard this patch.
payload/modules/medialibrarypro/src/Rules/UploadedMediaRules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
         return $this->attribute('name', $rules);
89 89
     }
90 90
 
91
-    public function attribute(string $attribute, array|string $rules): self
91
+    public function attribute(string $attribute, array | string $rules): self
92 92
     {
93 93
         $this->itemRules[] = new AttributeRule($attribute, $rules);
94 94
 
Please login to merge, or discard this patch.
payload/modules/medialibrarypro/src/Rules/ItemRules/DimensionsRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public function validateMediaItem(): bool
14 14
     {
15
-        if (! $media = $this->getTemporaryUploadMedia()) {
15
+        if (!$media = $this->getTemporaryUploadMedia()) {
16 16
             return true;
17 17
         }
18 18
 
Please login to merge, or discard this patch.
payload/modules/medialibrarypro/src/Rules/ItemRules/MediaItemRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
         $temporaryUpload = $temporaryUploadModelClass::findByMediaUuidInCurrentSession($this->value['uuid']);
24 24
 
25
-        if (! $temporaryUpload) {
25
+        if (!$temporaryUpload) {
26 26
             return null;
27 27
         }
28 28
 
Please login to merge, or discard this patch.
payload/modules/medialibrarypro/src/Rules/Concerns/ValidatesMedia.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
     {
25 25
         $this->prepareForValidation();
26 26
 
27
-        if (! $this->passesAuthorization()) {
27
+        if (!$this->passesAuthorization()) {
28 28
             $this->failedAuthorization();
29 29
         }
30 30
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                     $remainingRules[$attribute][] = $rule;
90 90
                 }
91 91
 
92
-                $minimumRuleUsed = collect($remainingRules[$attribute])->contains(function ($rule) {
92
+                $minimumRuleUsed = collect($remainingRules[$attribute])->contains(function($rule) {
93 93
                     if (is_string($rule)) {
94 94
                         return false;
95 95
                     }
Please login to merge, or discard this patch.
payload/modules/medialibrarypro/src/Dto/ViewMediaItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         return new HtmlString(implode(PHP_EOL, [
37 37
                 'x-data',
38
-                'x-on:keyup.debounce.' . $debounceInMs . '="$wire.setCustomProperty(\'' . $this->uuid .'\', \''  . $name . '\', document.getElementsByName(\'' . $this->customPropertyAttributeName($name) .'\')[0].value)"',
38
+                'x-on:keyup.debounce.'.$debounceInMs.'="$wire.setCustomProperty(\''.$this->uuid.'\', \''.$name.'\', document.getElementsByName(\''.$this->customPropertyAttributeName($name).'\')[0].value)"',
39 39
                 $this->customPropertyAttributes($name),
40 40
         ]));
41 41
     }
Please login to merge, or discard this patch.