Passed
Push — master ( f972fc...fc48d8 )
by Gabriel
03:18
created
src/Validation/Validators/FileValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $constraint = $this->getConstraint();
56 56
 
57 57
         if ($constraint->mimeTypes) {
58
-            $mimeTypes = (array) $constraint->mimeTypes;
58
+            $mimeTypes = (array)$constraint->mimeTypes;
59 59
             $mime = $this->determineMime();
60 60
             foreach ($mimeTypes as $mimeType) {
61 61
                 if ($mimeType === $mime) {
Please login to merge, or discard this patch.
src/MediaRepository/MediaRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
 
75 75
     protected function getDefaultFilterFunction(array $filters): Closure
76 76
     {
77
-        return function (Media $media) use ($filters) {
77
+        return function(Media $media) use ($filters) {
78 78
             foreach ($filters as $property => $value) {
79
-                if (! Arr::has($media->custom_properties, $property)) {
79
+                if (!Arr::has($media->custom_properties, $property)) {
80 80
                     return false;
81 81
                 }
82 82
 
Please login to merge, or discard this patch.
src/Validation/Validators/ImageValidator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $height = $size[1];
49 49
 
50 50
         if ($constraint->minWidth) {
51
-            if (!ctype_digit((string) $constraint->minWidth)) {
51
+            if (!ctype_digit((string)$constraint->minWidth)) {
52 52
                 throw new Exception(sprintf(
53 53
                     '"%s" is not a valid minimum width',
54 54
                     $constraint->minWidth
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         if ($constraint->maxWidth) {
69
-            if (!ctype_digit((string) $constraint->maxWidth)) {
69
+            if (!ctype_digit((string)$constraint->maxWidth)) {
70 70
                 throw new Exception(sprintf(
71 71
                     '"%s" is not a valid maximum width',
72 72
                     $constraint->maxWidth
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             }
84 84
         }
85 85
         if ($constraint->minHeight) {
86
-            if (!ctype_digit((string) $constraint->minHeight)) {
86
+            if (!ctype_digit((string)$constraint->minHeight)) {
87 87
                 throw new Exception(sprintf(
88 88
                     '"%s" is not a valid minimum height',
89 89
                     $constraint->minHeight
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             }
101 101
         }
102 102
         if ($constraint->maxHeight) {
103
-            if (!ctype_digit((string) $constraint->maxHeight)) {
103
+            if (!ctype_digit((string)$constraint->maxHeight)) {
104 104
                 throw new Exception(sprintf(
105 105
                     '"%s" is not a valid maximum height',
106 106
                     $constraint->maxHeight
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
         $ratio = round($width / $height, 2);
118 118
         if (null !== $constraint->minRatio) {
119
-            if (!is_numeric((string) $constraint->minRatio)) {
119
+            if (!is_numeric((string)$constraint->minRatio)) {
120 120
                 throw new Exception(sprintf(
121 121
                     '"%s" is not a valid minimum ratio',
122 122
                     $constraint->minRatio
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             }
132 132
         }
133 133
         if (null !== $constraint->maxRatio) {
134
-            if (!is_numeric((string) $constraint->maxRatio)) {
134
+            if (!is_numeric((string)$constraint->maxRatio)) {
135 135
                 throw new Exception(sprintf(
136 136
                     '"%s" is not a valid maximum ratio',
137 137
                     $constraint->maxRatio
Please login to merge, or discard this patch.
src/Loaders/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         );
59 59
         $files = [];
60 60
         foreach ($mediaRecords as $mediaRecord) {
61
-            $files[] = new File($this->getFilesystem(),$mediaRecord->path);
61
+            $files[] = new File($this->getFilesystem(), $mediaRecord->path);
62 62
         }
63 63
         return $files;
64 64
     }
Please login to merge, or discard this patch.
src/Models/MediaProperties/MediaProperties.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
      * @param Collection|string $collection
22 22
      * @return MediaProperty|Record
23 23
      */
24
-    public function for(Record $model, $collection)
24
+    public function for (Record $model, $collection)
25 25
     {
26 26
         $collection = is_object($collection) ? $collection->getName() : $collection;
27 27
         if ($model->hasRelation('MediaProperties')) {
28 28
             return $model->getRelation('MediaProperties')->getResults()->filter(
29
-                function ($item) use ($collection) {
29
+                function($item) use ($collection) {
30 30
                     return $item->collection_name == $collection;
31 31
                 }
32 32
             )->current();
Please login to merge, or discard this patch.
src/Models/MediaRecords/MediaRecords.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@
 block discarded – undo
23 23
      * @param $collection
24 24
      * @return MediaProperty[]|Collection
25 25
      */
26
-    public function for(Record $model, $collection)
26
+    public function for (Record $model, $collection)
27 27
     {
28 28
         $collection = is_object($collection) ? $collection->getName() : $collection;
29 29
 
30 30
         if ($model->hasRelation('Media')) {
31 31
             return $model->getRelation('Media')->getResults()->filter(
32
-                function ($item) use ($collection) {
32
+                function($item) use ($collection) {
33 33
                     return $item->collection_name == $collection;
34 34
                 }
35 35
             );
Please login to merge, or discard this patch.
src/Collections/Traits/HasAcceptsMediaTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     protected function initHasAcceptsMediaWithValidation()
31 31
     {
32
-        $this->acceptsMedia(function ($file) {
32
+        $this->acceptsMedia(function($file) {
33 33
             $validator = $this->getValidator();
34 34
             $constraint = $this->getConstraint();
35 35
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     protected function initHasAcceptsMediaEmpty()
46 46
     {
47
-        $this->acceptsMedia(function () {
47
+        $this->acceptsMedia(function() {
48 48
             return true;
49 49
         });
50 50
     }
Please login to merge, or discard this patch.
src/Conversions/ConversionCollection.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 getByName(string $name): Conversion
14 14
     {
15
-        $conversion = $this->first(function (Conversion $conversion) use ($name) {
15
+        $conversion = $this->first(function(Conversion $conversion) use ($name) {
16 16
             return $conversion->getName() === $name;
17 17
         });
18 18
 
Please login to merge, or discard this patch.