Completed
Push — master ( 7a9bc2...718e47 )
by Jan
04:10
created
src/Form/AdminPages/ImportType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,12 +66,12 @@
 block discarded – undo
66 66
         //Disable import if user is not allowed to create elements.
67 67
         $entity = new $data['entity_class']();
68 68
         $perm_name = "create";
69
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
69
+        $disabled = !$this->security->isGranted($perm_name, $entity);
70 70
 
71 71
         $builder
72 72
 
73 73
             ->add('format', ChoiceType::class, [
74
-                'choices' => ['JSON' => 'json', 'XML' => 'xml','CSV' => 'csv' ,'YAML' => 'yaml'],
74
+                'choices' => ['JSON' => 'json', 'XML' => 'xml', 'CSV' => 'csv', 'YAML' => 'yaml'],
75 75
                 'label' => $this->trans->trans('export.format'),
76 76
                 'disabled' => $disabled])
77 77
             ->add('csv_separator', TextType::class, ['data' => ';',
Please login to merge, or discard this patch.
src/Form/AdminPages/MassCreationForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         //Disable import if user is not allowed to create elements.
66 66
         $entity = new $data['entity_class']();
67 67
         $perm_name = "create";
68
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
68
+        $disabled = !$this->security->isGranted($perm_name, $entity);
69 69
 
70 70
         $builder
71 71
             ->add('lines', TextareaType::class, ['data' => '',
Please login to merge, or discard this patch.
src/Form/AdminPages/BaseEntityAdminForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 'label' =>  $this->trans->trans('entity.edit.not_selectable'),
84 84
                 'help' =>  $this->trans->trans('entity.edit.not_selectable.help'),
85 85
                 'label_attr' => ['class' => 'checkbox-custom'],
86
-                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity) ])
86
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)])
87 87
 
88 88
             ->add('comment', CKEditorType::class, ['required' => false, 'empty_data' => '',
89 89
                 'label' =>  $this->trans->trans('comment.label'),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
             //Buttons
96 96
             $builder->add('save', SubmitType::class, [
97
-                'label' =>  $is_new ?  $this->trans->trans('entity.create') :  $this->trans->trans('entity.edit.save'),
97
+                'label' =>  $is_new ? $this->trans->trans('entity.create') : $this->trans->trans('entity.edit.save'),
98 98
                 'attr' => ['class' => $is_new ? 'btn-success' : ''],
99 99
                 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)])
100 100
             ->add('reset', ResetType::class, ['label' => 'entity.edit.reset',
Please login to merge, or discard this patch.
src/Form/Part/PartBaseType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -217,12 +217,12 @@
 block discarded – undo
217 217
             'label' => $this->trans->trans('part.edit.master_attachment'),
218 218
             'class' => PartAttachment::class,
219 219
             'attr' => ['class' => 'selectpicker'],
220
-            'choice_attr' => function ($choice, $key, $value) {
220
+            'choice_attr' => function($choice, $key, $value) {
221 221
                 /** @var Attachment $choice */
222 222
                 return ['data-subtext' => $choice->getFilename() ?? "URL"];
223 223
             },
224 224
             'choice_label' => 'name',
225
-            'query_builder' => function (EntityRepository $er) use ($part) {
225
+            'query_builder' => function(EntityRepository $er) use ($part) {
226 226
                 if ($part->getID() == null) {
227 227
                     //This query is always false, so we get empty results
228 228
                     return $er->createQueryBuilder('u')->where('0 = 2');
Please login to merge, or discard this patch.
src/DataTables/Column/EntityColumn.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,12 +70,12 @@
 block discarded – undo
70 70
 
71 71
         $resolver->setRequired('property');
72 72
 
73
-        $resolver->setDefault('field', function (Options $option) {
74
-            return $option['property'] . '.name';
73
+        $resolver->setDefault('field', function(Options $option) {
74
+            return $option['property'].'.name';
75 75
         });
76 76
 
77
-        $resolver->setDefault('render', function (Options $options) {
78
-            return function ($value, Part $context) use ($options) {
77
+        $resolver->setDefault('render', function(Options $options) {
78
+            return function($value, Part $context) use ($options) {
79 79
                 $entity = $this->accessor->getValue($context, $options['property']);
80 80
 
81 81
                 if ($entity) {
Please login to merge, or discard this patch.
src/DataTables/PartsDataTable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
         }
130 130
 
131 131
         if (isset($options['tag'])) {
132
-            $builder->andWhere('part.tags LIKE :tag')->setParameter('tag', '%' . $options['tag'] . '%');
132
+            $builder->andWhere('part.tags LIKE :tag')->setParameter('tag', '%'.$options['tag'].'%');
133 133
         }
134 134
 
135 135
         if (isset($options['search'])) {
136 136
             $builder->AndWhere('part.name LIKE :search')->orWhere('part.description LIKE :search')->orWhere('part.comment LIKE :search')
137
-                ->setParameter('search', '%' . $options['search'] . '%');
137
+                ->setParameter('search', '%'.$options['search'].'%');
138 138
         }
139 139
     }
140 140
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $dataTable
148 148
             ->add('name', TextColumn::class, [
149 149
                 'label' => $this->translator->trans('part.table.name'),
150
-                'render' => function ($value, Part $context) {
150
+                'render' => function($value, Part $context) {
151 151
                     return sprintf(
152 152
                         '<a href="%s">%s</a>',
153 153
                         $this->urlGenerator->infoURL($context),
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             ])
177 177
             ->add('storelocation', TextColumn::class, [
178 178
                 'label' => $this->translator->trans('part.table.storeLocations'),
179
-                'render' => function ($value, Part $context) {
179
+                'render' => function($value, Part $context) {
180 180
                     $tmp = array();
181 181
                     foreach ($context->getPartLots() as $lot) {
182 182
                         //Ignore lots without storelocation
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                 },
262 262
                 'entity' => Part::class,
263 263
                 'criteria' => [
264
-                    function (QueryBuilder $builder) use ($options) {
264
+                    function(QueryBuilder $builder) use ($options) {
265 265
                         $this->buildCriteria($builder, $options);
266 266
                     },
267 267
                     new SearchCriteriaProvider()
Please login to merge, or discard this patch.