Completed
Push — master ( 7c73c0...76b9a1 )
by
unknown
03:06 queued 01:03
created
File/UploadableFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $this->root_path = $root_path;
26 26
         $this->web_path  = $web_path;
27 27
 
28
-        parent::__construct($root_path . $web_path);
28
+        parent::__construct($root_path.$web_path);
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
DependencyInjection/FenrizbesUploadableExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         if (isset($config['root_path']) && !empty($config['root_path'])) {
26 26
             $root_path = rtrim($config['root_path'], '/');
27 27
         } else {
28
-            $root_path = $container->getParameter('kernel.root_dir') .'/../web';
28
+            $root_path = $container->getParameter('kernel.root_dir').'/../web';
29 29
         }
30 30
 
31 31
         $container->setParameter('fenrizbes_uploadable.root_path', $root_path);
Please login to merge, or discard this patch.
Form/Extension/FileNameTypeExtension.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
     public function getExtendedType() {
24 24
         if(static::isLegacy()) {
25 25
             return FileType::class;
26
-        }
27
-        else {
26
+        } else {
28 27
             return 'file';
29 28
         }
30 29
     }
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
             if(method_exists($object, 'setOriginalFileName')) {
47 46
                 $object->setOriginalFileName($fieldName, $fileData->getClientOriginalName());
48 47
             }
49
-        }
50
-        else {
48
+        } else {
51 49
             if(is_array($event->getForm()->getData())) {
52 50
                 foreach($event->getForm()->getData() as $key => $item) {
53 51
                     if(method_exists($item, 'setOriginalFileName')) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 class FileNameTypeExtension extends AbstractTypeExtension
23 23
 {
24 24
     public function getExtendedType() {
25
-        if(static::isLegacy()) {
25
+        if (static::isLegacy()) {
26 26
             return FileType::class;
27 27
         }
28 28
         else {
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
         $fileData = $event->getData();
44 44
 
45 45
         $object = $event->getForm()->getParent()->getData();
46
-        if(!$event->getForm()->getConfig()->getOption('multiple')) {
47
-            if(method_exists($object, 'setOriginalFileName') && $fileData instanceof UploadedFile) {
46
+        if (!$event->getForm()->getConfig()->getOption('multiple')) {
47
+            if (method_exists($object, 'setOriginalFileName') && $fileData instanceof UploadedFile) {
48 48
                 $object->setOriginalFileName($fieldName, $fileData->getClientOriginalName());
49 49
             }
50 50
         }
51 51
         else {
52
-            if(is_array($event->getForm()->getData())) {
53
-                foreach($event->getForm()->getData() as $key => $item) {
54
-                    if(method_exists($item, 'setOriginalFileName') && $fileData[$key] instanceof UploadedFile) {
52
+            if (is_array($event->getForm()->getData())) {
53
+                foreach ($event->getForm()->getData() as $key => $item) {
54
+                    if (method_exists($item, 'setOriginalFileName') && $fileData[$key] instanceof UploadedFile) {
55 55
                         $item->setOriginalFileName($fieldName, $fileData[$key]->getClientOriginalName()); //$item->getClientOriginalName()
56 56
                     }
57 57
                 }
Please login to merge, or discard this patch.