@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | 'required' => false, |
| 116 | 116 | 'label' => 'attachment.edit.secure_file', |
| 117 | 117 | 'mapped' => false, |
| 118 | - 'disabled' => ! $this->security->isGranted('@parts_attachments.show_private'), |
|
| 118 | + 'disabled' => !$this->security->isGranted('@parts_attachments.show_private'), |
|
| 119 | 119 | 'attr' => [ |
| 120 | 120 | 'class' => 'form-control-sm', |
| 121 | 121 | ], |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | 'required' => false, |
| 144 | 144 | 'label' => 'attachment.edit.download_url', |
| 145 | 145 | 'mapped' => false, |
| 146 | - 'disabled' => ! $this->allow_attachments_download, |
|
| 146 | + 'disabled' => !$this->allow_attachments_download, |
|
| 147 | 147 | 'attr' => [ |
| 148 | 148 | 'class' => 'form-control-sm', |
| 149 | 149 | ], |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ], |
| 170 | 170 | ]); |
| 171 | 171 | |
| 172 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event): void { |
|
| 172 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event): void { |
|
| 173 | 173 | $form = $event->getForm(); |
| 174 | 174 | $attachment = $form->getData(); |
| 175 | 175 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | //Check the secure file checkbox, if file is in securefile location |
| 189 | 189 | $builder->get('secureFile')->addEventListener( |
| 190 | 190 | FormEvents::PRE_SET_DATA, |
| 191 | - function (FormEvent $event): void { |
|
| 191 | + function(FormEvent $event): void { |
|
| 192 | 192 | $attachment = $event->getForm()->getParent()->getData(); |
| 193 | 193 | if ($attachment instanceof Attachment) { |
| 194 | 194 | $event->setData($attachment->isSecure()); |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | $iso_code = $input->getArgument('iso_code'); |
| 98 | 98 | $repo = $this->em->getRepository(Currency::class); |
| 99 | 99 | |
| 100 | - if (! empty($iso_code)) { |
|
| 100 | + if (!empty($iso_code)) { |
|
| 101 | 101 | $candidates = $repo->findBy(['iso_code' => $iso_code]); |
| 102 | 102 | } else { |
| 103 | 103 | $candidates = $repo->findAll(); |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | if ( |
| 204 | 204 | $entity instanceof LabelProfile |
| 205 | 205 | && 'twig' === $entity->getOptions()->getLinesMode() |
| 206 | - && ! $this->isGranted('@labels.use_twig') |
|
| 206 | + && !$this->isGranted('@labels.use_twig') |
|
| 207 | 207 | ) { |
| 208 | 208 | $form_options['disable_options'] = true; |
| 209 | 209 | } |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | 'attachment_class' => $this->attachment_class, |
| 252 | 252 | 'parameter_class' => $this->parameter_class, |
| 253 | 253 | ]); |
| 254 | - } elseif ($form->isSubmitted() && ! $form->isValid()) { |
|
| 254 | + } elseif ($form->isSubmitted() && !$form->isValid()) { |
|
| 255 | 255 | $this->addFlash('error', 'entity.edit_flash.invalid'); |
| 256 | 256 | } |
| 257 | 257 | |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | - if ($form->isSubmitted() && ! $form->isValid()) { |
|
| 349 | + if ($form->isSubmitted() && !$form->isValid()) { |
|
| 350 | 350 | $this->addFlash('error', 'entity.created_flash.invalid'); |
| 351 | 351 | } |
| 352 | 352 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | protected function additionalActionNew(FormInterface $form, AbstractNamedDBElement $entity): bool |
| 134 | 134 | { |
| 135 | - if ($entity instanceof User && ! empty($form['new_password']->getData())) { |
|
| 135 | + if ($entity instanceof User && !empty($form['new_password']->getData())) { |
|
| 136 | 136 | $password = $this->passwordEncoder->encodePassword($entity, $form['new_password']->getData()); |
| 137 | 137 | $entity->setPassword($password); |
| 138 | 138 | //By default the user must change the password afterwards |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | * |
| 150 | 150 | * @return Response |
| 151 | 151 | */ |
| 152 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?User $entity = null): Response |
|
| 152 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?User $entity = null) : Response |
|
| 153 | 153 | { |
| 154 | 154 | return $this->_new($request, $em, $importer, $entity); |
| 155 | 155 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | //If no user id was passed, then we show info about the current user |
| 211 | 211 | if (null === $user) { |
| 212 | 212 | $tmp = $this->getUser(); |
| 213 | - if (! $tmp instanceof User) { |
|
| 213 | + if (!$tmp instanceof User) { |
|
| 214 | 214 | throw new InvalidArgumentException('Userinfo only works for database users!'); |
| 215 | 215 | } |
| 216 | 216 | $user = $tmp; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | 'title' => 'selectpicker.nothing_selected', |
| 74 | 74 | 'data-live-search' => true, |
| 75 | 75 | ], |
| 76 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
| 76 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
| 77 | 77 | ]); |
| 78 | 78 | |
| 79 | 79 | $builder->add('exchange_rate', BigDecimalMoneyType::class, [ |
@@ -81,16 +81,16 @@ discard block |
||
| 81 | 81 | 'label' => 'currency.edit.exchange_rate', |
| 82 | 82 | 'currency' => $this->default_currency, |
| 83 | 83 | 'scale' => 6, |
| 84 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
| 84 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
| 85 | 85 | ]); |
| 86 | 86 | |
| 87 | - if(!$is_new) { |
|
| 87 | + if (!$is_new) { |
|
| 88 | 88 | $builder->add( |
| 89 | 89 | 'update_exchange_rate', |
| 90 | 90 | SubmitType::class, |
| 91 | 91 | [ |
| 92 | 92 | 'label' => 'currency.edit.update_rate', |
| 93 | - 'disabled' => ! $this->security->isGranted('edit', $entity) |
|
| 93 | + 'disabled' => !$this->security->isGranted('edit', $entity) |
|
| 94 | 94 | ] |
| 95 | 95 | ); |
| 96 | 96 | } |