Completed
Push — master ( c52783...cd75c7 )
by Gabriel
06:40 queued 10s
created
src/FileAdder/Traits/HasFileTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     public function setFileFromSymfonyFile($file)
74 74
     {
75 75
         $this->file = $file;
76
-        $this->setPathToFile($file->getPath().'/'.$file->getFilename());
76
+        $this->setPathToFile($file->getPath() . '/' . $file->getFilename());
77 77
         $this->setFileName(pathinfo($file->getFilename(), PATHINFO_BASENAME));
78 78
         $this->mediaName = pathinfo($file->getFilename(), PATHINFO_FILENAME);
79 79
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public function setFileFromUploadedFile($file)
89 89
     {
90 90
         $this->file = $file;
91
-        $this->setPathToFile($file->getPath().'/'.$file->getFilename());
91
+        $this->setPathToFile($file->getPath() . '/' . $file->getFilename());
92 92
         $this->setFileName($file->getClientOriginalName());
93 93
         $this->mediaName = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);
94 94
 
Please login to merge, or discard this patch.
src/FileAdder/Traits/FileAdderProcessesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     {
49 49
         $media = $this->getMedia();
50 50
         $destination = PathGeneratorFactory::create()::getBasePathForMediaOriginal($media);
51
-        $destination .= DIRECTORY_SEPARATOR.$media->getCollection()->getStrategy()::makeFileName($this);
51
+        $destination .= DIRECTORY_SEPARATOR . $media->getCollection()->getStrategy()::makeFileName($this);
52 52
 
53 53
         $media->generateFileFromContent($destination, fopen($this->getPathToFile(), 'r'));
54 54
 
Please login to merge, or discard this patch.
src/Validation/Constraints/Traits/InitTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     protected function initVariablesFromConfig()
30 30
     {
31
-        $configKey = 'media-library.contraints.'.$this->getName();
31
+        $configKey = 'media-library.contraints.' . $this->getName();
32 32
 
33 33
         if (function_exists('config') && function_exists('app')) {
34 34
             if (config()->has($configKey)) {
Please login to merge, or discard this patch.
src/Validation/Validators/AbstractValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $firstName = $this->getClassFirstName();
97 97
         $contraintFirstName = str_replace('Validator', 'Constraint', $firstName);
98 98
 
99
-        return str_replace('\Validators\\'.$firstName, '\Constraints\\'.$contraintFirstName, $className);
99
+        return str_replace('\Validators\\' . $firstName, '\Constraints\\' . $contraintFirstName, $className);
100 100
     }
101 101
 
102 102
     /**
Please login to merge, or discard this patch.
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/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('"%s" is not a valid minimum width',
53 53
                     $constraint->minWidth));
54 54
             }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         }
65 65
 
66 66
         if ($constraint->maxWidth) {
67
-            if (!ctype_digit((string) $constraint->maxWidth)) {
67
+            if (!ctype_digit((string)$constraint->maxWidth)) {
68 68
                 throw new Exception(sprintf('"%s" is not a valid maximum width',
69 69
                     $constraint->maxWidth));
70 70
             }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             }
80 80
         }
81 81
         if ($constraint->minHeight) {
82
-            if (!ctype_digit((string) $constraint->minHeight)) {
82
+            if (!ctype_digit((string)$constraint->minHeight)) {
83 83
                 throw new Exception(sprintf('"%s" is not a valid minimum height',
84 84
                     $constraint->minHeight));
85 85
             }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             }
95 95
         }
96 96
         if ($constraint->maxHeight) {
97
-            if (!ctype_digit((string) $constraint->maxHeight)) {
97
+            if (!ctype_digit((string)$constraint->maxHeight)) {
98 98
                 throw new Exception(sprintf('"%s" is not a valid maximum height',
99 99
                     $constraint->maxHeight));
100 100
             }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         }
109 109
         $ratio = round($width / $height, 2);
110 110
         if (null !== $constraint->minRatio) {
111
-            if (!is_numeric((string) $constraint->minRatio)) {
111
+            if (!is_numeric((string)$constraint->minRatio)) {
112 112
                 throw new Exception(sprintf('"%s" is not a valid minimum ratio',
113 113
                     $constraint->minRatio));
114 114
             }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             }
122 122
         }
123 123
         if (null !== $constraint->maxRatio) {
124
-            if (!is_numeric((string) $constraint->maxRatio)) {
124
+            if (!is_numeric((string)$constraint->maxRatio)) {
125 125
                 throw new Exception(sprintf('"%s" is not a valid maximum ratio',
126 126
                     $constraint->maxRatio));
127 127
             }
Please login to merge, or discard this patch.
src/Collections/UploadStrategy/AbstractStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             return static::transformFileName($path, $extension);
40 40
         }
41 41
 
42
-        throw new \RuntimeException(__METHOD__.' needs a UploadedFile|SplFileInfo|string instance or a file path string');
42
+        throw new \RuntimeException(__METHOD__ . ' needs a UploadedFile|SplFileInfo|string instance or a file path string');
43 43
     }
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
src/Collections/UploadStrategy/GenericStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,6 +16,6 @@
 block discarded – undo
16 16
      */
17 17
     public static function transformFileName($path, $extension)
18 18
     {
19
-        return date('Y-m-d-').md5($path.time()).'.'.$extension;
19
+        return date('Y-m-d-') . md5($path . time()) . '.' . $extension;
20 20
     }
21 21
 }
Please login to merge, or discard this patch.
src/Collections/UploadStrategy/OriginalNameStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,6 @@
 block discarded – undo
17 17
     {
18 18
         $name = pathinfo($path, PATHINFO_FILENAME);
19 19
 
20
-        return $name.'.'.$extension;
20
+        return $name . '.' . $extension;
21 21
     }
22 22
 }
Please login to merge, or discard this patch.