Passed
Branch master (df9557)
by Jan
09:40
created
src/Services/PaymentEmailMailToGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.
src/Admin/Filter/MoneyAmountFilterType.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -45,29 +45,29 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
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.');
Please login to merge, or discard this patch.
src/Admin/Filter/ConfirmedFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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))
Please login to merge, or discard this patch.
src/Admin/Filter/DepartmentTypeFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
src/Admin/Field/PasswordField.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Kernel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,26 +30,26 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Validator/ValidGoogleAuthCodeValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Form/PaymentOrderType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
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
         ]);
Please login to merge, or discard this patch.
src/Form/SepaExportType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.