@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | $is_new = $entity->getID() === null; |
46 | 46 | |
47 | - $builder->add('iso_code', CurrencyType::class , ['required' => true, |
|
47 | + $builder->add('iso_code', CurrencyType::class, ['required' => true, |
|
48 | 48 | 'required' => false, |
49 | 49 | 'label' => 'currency.iso_code.label', |
50 | 50 | 'preferred_choices' => ['EUR', 'USD', 'GBP', 'JPY', 'CNY'], |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | |
81 | 81 | //Add pricedetails after we know the data, so we can set the default currency |
82 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) { |
|
82 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) { |
|
83 | 83 | /** @var Orderdetail $orderdetail */ |
84 | 84 | $orderdetail = $event->getData(); |
85 | 85 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | // This options allows you to override the currency shown for the null value |
63 | 63 | $resolver->setDefault('base_currency', null); |
64 | 64 | |
65 | - $resolver->setDefault('empty_message', function (Options $options) { |
|
65 | + $resolver->setDefault('empty_message', function(Options $options) { |
|
66 | 66 | //By default we use the global base currency: |
67 | 67 | $iso_code = $this->base_currency; |
68 | 68 |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | public function buildForm(FormBuilderInterface $builder, array $options) |
75 | 75 | { |
76 | 76 | $builder->addModelTransformer(new CallbackTransformer( |
77 | - function ($value) use ($options){ |
|
77 | + function($value) use ($options){ |
|
78 | 78 | return $this->transform($value, $options); |
79 | - }, function ($value) use ($options) { |
|
79 | + }, function($value) use ($options) { |
|
80 | 80 | return $this->reverseTransform($value, $options); |
81 | 81 | })); |
82 | 82 | } |
@@ -86,24 +86,24 @@ discard block |
||
86 | 86 | $resolver->setRequired(['class']); |
87 | 87 | $resolver->setDefaults([ |
88 | 88 | 'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext |
89 | - 'subentities_of' => null, //Only show entities with the given parent class |
|
90 | - 'disable_not_selectable' => false, //Disable entries with not selectable property |
|
89 | + 'subentities_of' => null, //Only show entities with the given parent class |
|
90 | + 'disable_not_selectable' => false, //Disable entries with not selectable property |
|
91 | 91 | 'choice_value' => 'id', //Use the element id as option value and for comparing items |
92 | - 'choice_loader' => function (Options $options) { |
|
93 | - return new CallbackChoiceLoader(function () use ($options) { |
|
92 | + 'choice_loader' => function(Options $options) { |
|
93 | + return new CallbackChoiceLoader(function() use ($options) { |
|
94 | 94 | return $this->getEntries($options); |
95 | 95 | }); |
96 | - }, 'choice_label' => function ($choice, $key, $value) { |
|
96 | + }, 'choice_label' => function($choice, $key, $value) { |
|
97 | 97 | return $this->generateChoiceLabels($choice, $key, $value); |
98 | - }, 'choice_attr' => function ($choice, $key, $value) { |
|
98 | + }, 'choice_attr' => function($choice, $key, $value) { |
|
99 | 99 | return $this->generateChoiceAttr($choice, $key, $value); |
100 | 100 | } |
101 | 101 | ]); |
102 | 102 | |
103 | 103 | $resolver->setDefault('empty_message', null); |
104 | 104 | |
105 | - $resolver->setDefault('attr', function (Options $options) { |
|
106 | - $tmp = ['class' => 'selectpicker', 'data-live-search' => true]; |
|
105 | + $resolver->setDefault('attr', function(Options $options) { |
|
106 | + $tmp = ['class' => 'selectpicker', 'data-live-search' => true]; |
|
107 | 107 | if ($options['empty_message']) { |
108 | 108 | $tmp['data-none-Selected-Text'] = $options['empty_message']; |
109 | 109 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | |
142 | 142 | $tmp = str_repeat(' ', $choice->getLevel()); //Use 3 spaces for intendation |
143 | - $tmp .= htmlspecialchars($choice->getName()); |
|
143 | + $tmp .= htmlspecialchars($choice->getName()); |
|
144 | 144 | return $tmp; |
145 | 145 | } |
146 | 146 |
@@ -188,7 +188,6 @@ |
||
188 | 188 | * in the database, you have to pass the "price_related_quantity" count as $multiplier. |
189 | 189 | * |
190 | 190 | * @return string the price as a bcmath string |
191 | - |
|
192 | 191 | */ |
193 | 192 | public function getPricePerUnit($multiplier = 1.0) : string |
194 | 193 | { |
@@ -356,6 +356,6 @@ |
||
356 | 356 | */ |
357 | 357 | public function getIDString(): string |
358 | 358 | { |
359 | - return 'PD' . sprintf('%06d', $this->getID()); |
|
359 | + return 'PD'.sprintf('%06d', $this->getID()); |
|
360 | 360 | } |
361 | 361 | } |