@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | //Add subject |
56 | 56 | $subject = $this->translator->trans('payment_order.mail.subject') . ' - ' |
57 | 57 | . urlencode($paymentOrder->getDepartment()->getName()) . ': ' . urlencode($paymentOrder->getProjectName()) |
58 | - . ' ' . urlencode('[#' . $paymentOrder->getId(). ']'); |
|
58 | + . ' ' . urlencode('[#' . $paymentOrder->getId() . ']'); |
|
59 | 59 | $string .= '?subject=' . $subject; |
60 | 60 | |
61 | 61 | $content = 'Link: ' . urlencode($this->crudUrlGenerator->build()->setController(PaymentOrderCrudController::class) |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $string = "mailto:"; |
80 | 80 | |
81 | - if(!empty($paymentOrder->getContactEmail())) { |
|
81 | + if (!empty($paymentOrder->getContactEmail())) { |
|
82 | 82 | $string .= urlencode($paymentOrder->getContactEmail()); |
83 | 83 | } elseif (!empty($paymentOrder->getDepartment()->getContactEmails())) { |
84 | 84 | $string .= urlencode(implode(';', $emails)); |
@@ -45,29 +45,29 @@ discard block |
||
45 | 45 | public function buildForm(FormBuilderInterface $builder, array $options): void |
46 | 46 | { |
47 | 47 | $builder->add('value2', $options['value_type'], $options['value_type_options'] + [ |
48 | - 'label' => false, |
|
49 | - ]); |
|
48 | + 'label' => false, |
|
49 | + ]); |
|
50 | 50 | |
51 | 51 | $builder->addModelTransformer(new CallbackTransformer( |
52 | - static function ($data) { return $data; }, |
|
53 | - static function ($data) { |
|
54 | - if (ComparisonType::BETWEEN === $data['comparison']) { |
|
55 | - if (null === $data['value'] || '' === $data['value'] || null === $data['value2'] || '' === $data['value2']) { |
|
56 | - throw new TransformationFailedException('Two values must be provided when "BETWEEN" comparison is selected.'); |
|
57 | - } |
|
52 | + static function ($data) { return $data; }, |
|
53 | + static function ($data) { |
|
54 | + if (ComparisonType::BETWEEN === $data['comparison']) { |
|
55 | + if (null === $data['value'] || '' === $data['value'] || null === $data['value2'] || '' === $data['value2']) { |
|
56 | + throw new TransformationFailedException('Two values must be provided when "BETWEEN" comparison is selected.'); |
|
57 | + } |
|
58 | 58 | |
59 | - // make sure value 2 is greater than value 1 |
|
60 | - if ($data['value'] > $data['value2']) { |
|
61 | - [$data['value'], $data['value2']] = [$data['value2'], $data['value']]; |
|
62 | - } |
|
63 | - } |
|
59 | + // make sure value 2 is greater than value 1 |
|
60 | + if ($data['value'] > $data['value2']) { |
|
61 | + [$data['value'], $data['value2']] = [$data['value2'], $data['value']]; |
|
62 | + } |
|
63 | + } |
|
64 | 64 | |
65 | - $data['value'] *= 100; |
|
66 | - $data['value2'] *= 100; |
|
65 | + $data['value'] *= 100; |
|
66 | + $data['value2'] *= 100; |
|
67 | 67 | |
68 | - return $data; |
|
69 | - } |
|
70 | - )); |
|
68 | + return $data; |
|
69 | + } |
|
70 | + )); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | public function configureOptions(OptionsResolver $resolver): void |
77 | 77 | { |
78 | 78 | $resolver->setDefaults([ |
79 | - 'value_type' => $this->valueType, |
|
80 | - 'value_type_options' => $this->valueTypeOptions, |
|
81 | - ]); |
|
79 | + 'value_type' => $this->valueType, |
|
80 | + 'value_type_options' => $this->valueTypeOptions, |
|
81 | + ]); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -49,8 +49,8 @@ |
||
49 | 49 | ]); |
50 | 50 | |
51 | 51 | $builder->addModelTransformer(new CallbackTransformer( |
52 | - static function ($data) { return $data; }, |
|
53 | - static function ($data) { |
|
52 | + static function($data) { return $data; }, |
|
53 | + static function($data) { |
|
54 | 54 | if (ComparisonType::BETWEEN === $data['comparison']) { |
55 | 55 | if (null === $data['value'] || '' === $data['value'] || null === $data['value2'] || '' === $data['value2']) { |
56 | 56 | throw new TransformationFailedException('Two values must be provided when "BETWEEN" comparison is selected.'); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | public function apply(QueryBuilder $queryBuilder, FilterDataDto $filterDataDto, ?FieldDto $fieldDto, EntityDto $entityDto): void |
44 | 44 | { |
45 | - if($filterDataDto->getValue() === false) { |
|
45 | + if ($filterDataDto->getValue() === false) { |
|
46 | 46 | $comparison = 'IS NULL'; |
47 | 47 | $queryBuilder |
48 | 48 | ->andWhere(sprintf('%s.%s %s', $filterDataDto->getEntityAlias(), 'confirm1_timestamp', $comparison)) |
@@ -36,8 +36,8 @@ |
||
36 | 36 | { |
37 | 37 | $choices = []; |
38 | 38 | |
39 | - foreach(Department::ALLOWED_TYPES as $type) { |
|
40 | - $choices['department.type.' . $type ] = $type; |
|
39 | + foreach (Department::ALLOWED_TYPES as $type) { |
|
40 | + $choices['department.type.' . $type] = $type; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $choices['department.type.section_misc'] = 'section_misc'; |
@@ -41,9 +41,9 @@ |
||
41 | 41 | ->setFormType(RepeatedType::class) |
42 | 42 | ->setTemplateName('crud/field/text') |
43 | 43 | ->setFormTypeOptions([ |
44 | - 'type' => PasswordType::class, |
|
45 | - 'first_options' => ['label' => 'password.new'], |
|
46 | - 'second_options' => ['label' => 'password.repeat'], |
|
47 | - ]); |
|
44 | + 'type' => PasswordType::class, |
|
45 | + 'first_options' => ['label' => 'password.new'], |
|
46 | + 'second_options' => ['label' => 'password.repeat'], |
|
47 | + ]); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | \ No newline at end of file |
@@ -30,26 +30,26 @@ |
||
30 | 30 | protected function configureContainer(ContainerConfigurator $container): void |
31 | 31 | { |
32 | 32 | $container->import('../config/{packages}/*.yaml'); |
33 | - $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); |
|
33 | + $container->import('../config/{packages}/' . $this->environment . '/*.yaml'); |
|
34 | 34 | |
35 | - if (file_exists(\dirname(__DIR__).'/config/services.yaml')) { |
|
35 | + if (file_exists(\dirname(__DIR__) . '/config/services.yaml')) { |
|
36 | 36 | $container->import('../config/{services}.yaml'); |
37 | - $container->import('../config/{services}_'.$this->environment.'.yaml'); |
|
37 | + $container->import('../config/{services}_' . $this->environment . '.yaml'); |
|
38 | 38 | } else { |
39 | - $path = \dirname(__DIR__).'/config/services.php'; |
|
39 | + $path = \dirname(__DIR__) . '/config/services.php'; |
|
40 | 40 | (require $path)($container->withPath($path), $this); |
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | 44 | protected function configureRoutes(RoutingConfigurator $routes): void |
45 | 45 | { |
46 | - $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); |
|
46 | + $routes->import('../config/{routes}/' . $this->environment . '/*.yaml'); |
|
47 | 47 | $routes->import('../config/{routes}/*.yaml'); |
48 | 48 | |
49 | - if (file_exists(\dirname(__DIR__).'/config/routes.yaml')) { |
|
49 | + if (file_exists(\dirname(__DIR__) . '/config/routes.yaml')) { |
|
50 | 50 | $routes->import('../config/{routes}.yaml'); |
51 | 51 | } else { |
52 | - $path = \dirname(__DIR__).'/config/routes.php'; |
|
52 | + $path = \dirname(__DIR__) . '/config/routes.php'; |
|
53 | 53 | (require $path)($routes->withPath($path), $this); |
54 | 54 | } |
55 | 55 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function validate($value, Constraint $constraint): void |
41 | 41 | { |
42 | - if (! $constraint instanceof ValidGoogleAuthCode) { |
|
42 | + if (!$constraint instanceof ValidGoogleAuthCode) { |
|
43 | 43 | throw new UnexpectedTypeException($constraint, ValidGoogleAuthCode::class); |
44 | 44 | } |
45 | 45 | |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | - if (! \is_string($value)) { |
|
50 | + if (!\is_string($value)) { |
|
51 | 51 | throw new UnexpectedValueException($value, 'string'); |
52 | 52 | } |
53 | 53 | |
54 | - if (! ctype_digit($value)) { |
|
54 | + if (!ctype_digit($value)) { |
|
55 | 55 | $this->context->addViolation('validator.google_code.only_digits_allowed'); |
56 | 56 | } |
57 | 57 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $user = $this->context->getObject()->getParent()->getData(); |
68 | 68 | |
69 | 69 | //Check if the given code is valid |
70 | - if (! $this->googleAuthenticator->checkCode($user, $value)) { |
|
70 | + if (!$this->googleAuthenticator->checkCode($user, $value)) { |
|
71 | 71 | $this->context->addViolation('validator.google_code.wrong_code'); |
72 | 72 | } |
73 | 73 | } |
@@ -121,7 +121,7 @@ |
||
121 | 121 | ]); |
122 | 122 | |
123 | 123 | $builder->add('comment', TextareaType::class, [ |
124 | - 'label' => 'payment_order.comment.label', |
|
124 | + 'label' => 'payment_order.comment.label', |
|
125 | 125 | 'empty_data' => '', |
126 | 126 | 'required' => false, |
127 | 127 | ]); |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | 'data-mode-manual' => true, |
59 | 59 | ], |
60 | 60 | 'placeholder' => 'sepa_export.bank_account.placeholder', |
61 | - 'choice_label' => function( BankAccount $account) { |
|
61 | + 'choice_label' => function(BankAccount $account) { |
|
62 | 62 | return $account->getExportAccountName() . ' [' . $account->getIban() . ']'; |
63 | 63 | }, |
64 | 64 | ]); |
65 | 65 | |
66 | - $builder->add('name',TextType::class, [ |
|
66 | + $builder->add('name', TextType::class, [ |
|
67 | 67 | 'label' => 'sepa_export.name.label', |
68 | 68 | 'attr' => [ |
69 | 69 | 'data-manual-input' => true, |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | ] |
88 | 88 | ]); |
89 | 89 | |
90 | - $builder->add("submit",SubmitType::class, [ |
|
90 | + $builder->add("submit", SubmitType::class, [ |
|
91 | 91 | 'label' => 'sepa_export.submit', |
92 | 92 | ]); |
93 | 93 | } |