Passed
Push — master ( e8f83f...f116c2 )
by Jan
05:37
created
src/Controller/AdminPages/DeviceController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      *
96 96
      * @return Response
97 97
      */
98
-    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Device $entity = null): Response
98
+    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Device $entity = null) : Response
99 99
     {
100 100
         return $this->_new($request, $em, $importer, $entity);
101 101
     }
Please login to merge, or discard this patch.
src/Controller/AdminPages/AttachmentTypeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      *
96 96
      * @return Response
97 97
      */
98
-    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AttachmentType $entity = null): Response
98
+    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AttachmentType $entity = null) : Response
99 99
     {
100 100
         return $this->_new($request, $em, $importer, $entity);
101 101
     }
Please login to merge, or discard this patch.
src/Controller/AdminPages/ManufacturerController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      *
95 95
      * @return Response
96 96
      */
97
-    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Manufacturer $entity = null): Response
97
+    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Manufacturer $entity = null) : Response
98 98
     {
99 99
         return $this->_new($request, $em, $importer, $entity);
100 100
     }
Please login to merge, or discard this patch.
src/Controller/AdminPages/SupplierController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      *
95 95
      * @return Response
96 96
      */
97
-    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Supplier $entity = null): Response
97
+    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Supplier $entity = null) : Response
98 98
     {
99 99
         return $this->_new($request, $em, $importer, $entity);
100 100
     }
Please login to merge, or discard this patch.
src/Controller/GroupController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      *
87 87
      * @return Response
88 88
      */
89
-    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Group $entity = null): Response
89
+    public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Group $entity = null) : Response
90 90
     {
91 91
         return $this->_new($request, $em, $importer, $entity);
92 92
     }
Please login to merge, or discard this patch.
src/Form/Type/MasterPictureAttachmentType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
                                    'attr' => [
68 68
                                        'class' => 'selectpicker',
69 69
                                    ],
70
-                                   'choice_attr' => function (Options $options) {
71
-                                       return  function ($choice, $key, $value) use ($options) {
70
+                                   'choice_attr' => function(Options $options) {
71
+                                       return  function($choice, $key, $value) use ($options) {
72 72
                                            /** @var Attachment $choice */
73 73
                                            $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL'];
74 74
 
75
-                                           if ('picture' === $options['filter'] && ! $choice->isPicture()) {
75
+                                           if ('picture' === $options['filter'] && !$choice->isPicture()) {
76 76
                                                $tmp += ['disabled' => 'disabled'];
77
-                                           } elseif ('3d_model' === $options['filter'] && ! $choice->is3DModel()) {
77
+                                           } elseif ('3d_model' === $options['filter'] && !$choice->is3DModel()) {
78 78
                                                $tmp += ['disabled' => 'disabled'];
79 79
                                            }
80 80
 
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
                                        };
83 83
                                    },
84 84
                                    'choice_label' => 'name',
85
-                                   'choice_loader' => function (Options $options) {
86
-                                       return new CallbackChoiceLoader(function () use ($options) {
85
+                                   'choice_loader' => function(Options $options) {
86
+                                       return new CallbackChoiceLoader(function() use ($options) {
87 87
                                            $entity = $options['entity'];
88 88
                                            if (!$entity instanceof AttachmentContainingDBElement) {
89 89
                                                throw new \RuntimeException('$entity must have Attachments! (be of type AttachmentContainingDBElement)');
Please login to merge, or discard this patch.
src/Form/CollectionTypeExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function buildForm(FormBuilderInterface $builder, array $options)
76 76
     {
77
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) {
77
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) {
78 78
             $data = $event->getData();
79 79
             $config = $event->getForm()->getConfig();
80 80
             //If enabled do a reindexing of the collection
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
                 foreach ($data->toArray() as $key => $item) {
87 87
                     $id = $this->propertyAccess->getValue($item, $options['reindex_path']);
88 88
                     //If element has an ID then use it. otherwise use default key
89
-                    $index = $id === null ? $key : $options['reindex_prefix'] . $id;
90
-                    $error_mapping['[' . $key . ']'] = $index;
89
+                    $index = $id === null ? $key : $options['reindex_prefix'].$id;
90
+                    $error_mapping['['.$key.']'] = $index;
91 91
                     $reindexed_data->set($index, $item);
92 92
                 }
93 93
                 $event->setData($reindexed_data);
Please login to merge, or discard this patch.
src/Form/Type/StructuralEntityType.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
     public function buildForm(FormBuilderInterface $builder, array $options): void
83 83
     {
84 84
         $builder->addModelTransformer(new CallbackTransformer(
85
-                                          function ($value) use ($options) {
85
+                                          function($value) use ($options) {
86 86
                                               return $this->transform($value, $options);
87
-                                          }, function ($value) use ($options) {
87
+                                          }, function($value) use ($options) {
88 88
                                           return $this->reverseTransform($value, $options);
89 89
                                       }));
90 90
     }
@@ -94,21 +94,21 @@  discard block
 block discarded – undo
94 94
         $resolver->setRequired(['class']);
95 95
         $resolver->setDefaults([
96 96
                                    'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext
97
-                                   'subentities_of' => null,   //Only show entities with the given parent class
98
-                                   'disable_not_selectable' => false,  //Disable entries with not selectable property
97
+                                   'subentities_of' => null, //Only show entities with the given parent class
98
+                                   'disable_not_selectable' => false, //Disable entries with not selectable property
99 99
                                    'choice_value' => 'id', //Use the element id as option value and for comparing items
100
-                                   'choice_loader' => function (Options $options) {
101
-                                       return new CallbackChoiceLoader(function () use ($options) {
100
+                                   'choice_loader' => function(Options $options) {
101
+                                       return new CallbackChoiceLoader(function() use ($options) {
102 102
                                            return $this->getEntries($options);
103 103
                                        });
104 104
                                    },
105
-                                   'choice_label' => function (Options $options) {
106
-                                       return function ($choice, $key, $value) use ($options) {
105
+                                   'choice_label' => function(Options $options) {
106
+                                       return function($choice, $key, $value) use ($options) {
107 107
                                            return $this->generateChoiceLabels($choice, $key, $value, $options);
108 108
                                        };
109 109
                                    },
110
-                                   'choice_attr' => function (Options $options) {
111
-                                       return function ($choice, $key, $value) use ($options) {
110
+                                   'choice_attr' => function(Options $options) {
111
+                                       return function($choice, $key, $value) use ($options) {
112 112
                                            return $this->generateChoiceAttr($choice, $key, $value, $options);
113 113
                                        };
114 114
                                    },
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         $resolver->setDefault('empty_message', null);
119 119
 
120
-        $resolver->setDefault('attr', function (Options $options) {
120
+        $resolver->setDefault('attr', function(Options $options) {
121 121
             $tmp = [
122 122
                 'class' => 'selectpicker',
123 123
                 'data-live-search' => true,
Please login to merge, or discard this patch.
src/EventSubscriber/UserSystem/SetUserTimezoneSubscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
 
51 51
         //Check if the user has set a timezone
52 52
         $user = $this->security->getUser();
53
-        if ($user instanceof User && ! empty($user->getTimezone())) {
53
+        if ($user instanceof User && !empty($user->getTimezone())) {
54 54
             $timezone = $user->getTimezone();
55 55
         }
56 56
 
57 57
         //Fill with default value if needed
58
-        if (null === $timezone && ! empty($this->default_timezone)) {
58
+        if (null === $timezone && !empty($this->default_timezone)) {
59 59
             $timezone = $this->default_timezone;
60 60
         }
61 61
 
Please login to merge, or discard this patch.