Passed
Push — master ( 986343...ae7ea4 )
by Jan
03:34
created
src/Form/TFA/TFAGoogleSettingsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
     public function buildForm(FormBuilderInterface $builder, array $options): void
41 41
     {
42
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event): void {
42
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event): void {
43 43
             $form = $event->getForm();
44 44
             /** @var User $user */
45 45
             $user = $event->getData();
Please login to merge, or discard this patch.
src/Command/UserChangePasswordCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@
 block discarded – undo
63 63
         ]);
64 64
 
65 65
         if (null === $user) {
66
-            $io->error('No user found with username '.$username);
66
+            $io->error('No user found with username ' . $username);
67 67
 
68 68
             return self::FAILURE;
69 69
         }
70 70
 
71
-        $io->confirm('You are about to change the password of following user: '.$username.' Continue?');
71
+        $io->confirm('You are about to change the password of following user: ' . $username . ' Continue?');
72 72
 
73 73
         $password = $input->getOption('password');
74 74
 
Please login to merge, or discard this patch.
src/Command/UserDisable2faCommand.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
             return self::FAILURE;
66 66
         }
67 67
 
68
-        $io->warning('You are about to remove all Two-Factor-Authentication methods of following user: '.$user->getUsername());
68
+        $io->warning('You are about to remove all Two-Factor-Authentication methods of following user: ' . $user->getUsername());
69 69
         $io->warning('Only continue if you are sure about the identity of the person that asked you to do this!');
70 70
 
71 71
         $continue = false;
Please login to merge, or discard this patch.
src/Command/UserNewCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         $io = new SymfonyStyle($input, $output);
57 57
         $username = $input->getArgument('username');
58 58
 
59
-        $io->confirm('You are about to create a new user with username: '.$username.' Continue?');
59
+        $io->confirm('You are about to create a new user with username: ' . $username . ' Continue?');
60 60
 
61 61
         $user = new User();
62 62
         $user->setUsername($username);
Please login to merge, or discard this patch.
src/Twig/AppExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
         $size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
41 41
         $factor = floor((strlen($bytes) - 1) / 3);
42 42
 
43
-        return sprintf("%.{$precision}f", $bytes / (1024 ** $factor)).@$size[$factor];
43
+        return sprintf("%.{$precision}f", $bytes / (1024 ** $factor)) . @$size[$factor];
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
src/Controller/ExportController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,18 +96,18 @@  discard block
 block discarded – undo
96 96
                 //Download as file
97 97
                 if (1 === count($xml_files)) {
98 98
                     $xml_string = array_values($xml_files)[0];
99
-                    $filename = 'export_'.date('Y-m-d_H-i-s').'.xml';
99
+                    $filename = 'export_' . date('Y-m-d_H-i-s') . '.xml';
100 100
                     $response = $this->getDownloadResponse($xml_string, $filename);
101 101
                 } else {
102 102
                     $data = [];
103 103
                     foreach ($xml_files as $key => $content) {
104
-                        $data[$key.'.xml'] = $content;
104
+                        $data[$key . '.xml'] = $content;
105 105
                     }
106 106
 
107 107
                     //Dont return already here... We need to set the exported flags first
108 108
                     $response = ZIPBinaryFileResponseFacade::createZIPResponseFromData(
109 109
                         $data,
110
-                        'export_'.date('Y-m-d_H-i-s').'.zip'
110
+                        'export_' . date('Y-m-d_H-i-s') . '.zip'
111 111
                     );
112 112
                 }
113 113
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 //Show error if auto mode is not possible
123 123
                 $this->addFlash('danger',
124 124
                     $this->translator->trans('sepa_export.error.department_missing_account')
125
-                    .': '.$exception->getWrongDepartment()->getName());
125
+                    .': ' . $exception->getWrongDepartment()->getName());
126 126
             }
127 127
         }
128 128
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $response = new Response();
138 138
         $response->headers->set('Cache-Control', 'private');
139 139
         $response->headers->set('Content-type', $mime_type);
140
-        $response->headers->set('Content-Disposition', 'attachment; filename="'.$filename.'";');
140
+        $response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '";');
141 141
         $response->headers->set('Content-length', strlen($content));
142 142
         $response->setContent($content);
143 143
 
Please login to merge, or discard this patch.
src/Controller/Admin/PaymentOrderCrudController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
                 $prefix = '';
108 108
             } else {
109 109
                 $prefix = $payment_order->getDepartment()
110
-                        ->getReferencesExportPrefix().'_';
110
+                        ->getReferencesExportPrefix() . '_';
111 111
             }
112 112
 
113
-            $data[$prefix.$payment_order->getIDString().'.'.$extension] = $path;
113
+            $data[$prefix . $payment_order->getIDString() . '.' . $extension] = $path;
114 114
 
115 115
             //Set exported status
116 116
             $payment_order->setReferencesExported(true);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         return ZIPBinaryFileResponseFacade::createZIPResponseFromFiles(
123 123
             $data,
124
-            'Belege_'.date('Y-m-d_H-i-s').'.zip');
124
+            'Belege_' . date('Y-m-d_H-i-s') . '.zip');
125 125
     }
126 126
 
127 127
     public function configureCrud(Crud $crud): Crud
@@ -237,32 +237,32 @@  discard block
 block discarded – undo
237 237
         ]);
238 238
 
239 239
         $emailAction = Action::new('sendEmail', 'payment_order.action.email', 'fas fa-envelope')
240
-            ->linkToUrl(function (PaymentOrder $paymentOrder) {
240
+            ->linkToUrl(function(PaymentOrder $paymentOrder) {
241 241
                 return $this->mailToGenerator->generateContactMailLink($paymentOrder);
242 242
             })
243 243
             ->setCssClass('text-dark');
244 244
 
245 245
         //Hide action if no contact emails are associated with department
246
-        $emailAction->displayIf(function (PaymentOrder $paymentOrder) {
246
+        $emailAction->displayIf(function(PaymentOrder $paymentOrder) {
247 247
             return null !== $this->mailToGenerator->generateContactMailLink($paymentOrder);
248 248
         });
249 249
 
250 250
         $hhv_action = Action::new('contactHHV', 'payment_order.action.contact_hhv', 'fas fa-comment-dots')
251
-            ->linkToUrl(function (PaymentOrder $paymentOrder) {
251
+            ->linkToUrl(function(PaymentOrder $paymentOrder) {
252 252
                 return $this->mailToGenerator->getHHVMailLink($paymentOrder);
253 253
             })
254 254
             ->setCssClass('mr-2 text-dark');
255 255
 
256 256
         $resend_confirmation_action = Action::new('resendConfirmation', 'payment_order.action.resend_confirmation', 'fas fa-redo')
257 257
             ->linkToCrudAction('resendConfirmationEmail')
258
-            ->displayIf(function (PaymentOrder $paymentOrder) {
258
+            ->displayIf(function(PaymentOrder $paymentOrder) {
259 259
                 return $this->isGranted('ROLE_EDIT_PAYMENT_ORDERS') && !$paymentOrder->isConfirmed();
260 260
             })
261 261
             ->setCssClass('mr-2 text-dark');
262 262
 
263 263
         $mathematically_correct_action = Action::new('mathematicallyCorrect', 'payment_order.action.mathematically_correct', 'fas fa-check')
264 264
             ->linkToCrudAction('checkMathematicallyCorrect')
265
-            ->displayIf(function (PaymentOrder $paymentOrder) {
265
+            ->displayIf(function(PaymentOrder $paymentOrder) {
266 266
                 return $this->isGranted('ROLE_PO_MATHEMATICALLY')
267 267
                     && $paymentOrder->isConfirmed()
268 268
                     && !$paymentOrder->isMathematicallyCorrect();
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
         $factually_correct_action = Action::new('factuallyCorrect', 'payment_order.action.factually_correct', 'fas fa-check')
273 273
             ->linkToCrudAction('checkFactuallyCorrect')
274
-            ->displayIf(function (PaymentOrder $paymentOrder) {
274
+            ->displayIf(function(PaymentOrder $paymentOrder) {
275 275
                 return $this->isGranted('ROLE_PO_FACTUALLY')
276 276
                     && $paymentOrder->isConfirmed()
277 277
                     && !$paymentOrder->isFactuallyCorrect()
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
 
282 282
         $manual_confirmation = Action::new('manual_confirmation', 'payment_order.action.manual_confirmation', 'fas fa-exclamation-triangle')
283 283
             ->setCssClass('mr-1 text-dark')
284
-            ->linkToRoute('payment_order_manual_confirm', function (PaymentOrder $paymentOrder) {
284
+            ->linkToRoute('payment_order_manual_confirm', function(PaymentOrder $paymentOrder) {
285 285
                 return [
286 286
                     'id' => $paymentOrder->getId(),
287 287
                 ];
288 288
             })
289
-            ->displayIf(function (PaymentOrder $paymentOrder) {
289
+            ->displayIf(function(PaymentOrder $paymentOrder) {
290 290
                 return $this->isGranted('ROLE_MANUAL_CONFIRMATION')
291 291
                     && !$paymentOrder->isConfirmed();
292 292
             });
Please login to merge, or discard this patch.
src/Controller/Admin/DashboardController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
         foreach ($filters as $filter => $value) {
76 76
             if (is_array($value)) {
77 77
                 foreach ($value as $subfilter => $subvalue) {
78
-                    $menuItem->setQueryParameter('filters['.$filter.']['.$subfilter.']', $subvalue);
78
+                    $menuItem->setQueryParameter('filters[' . $filter . '][' . $subfilter . ']', $subvalue);
79 79
                 }
80 80
             } else {
81
-                $menuItem->setQueryParameter('filters['.$filter.']', $value);
81
+                $menuItem->setQueryParameter('filters[' . $filter . ']', $value);
82 82
             }
83 83
         }
84 84
 
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
         $actions = parent::configureActions();
93 93
 
94 94
         $showLog = Action::new('showLog', 'action.show_logs', 'fas fa-binoculars')
95
-            ->displayIf(function (DBElementInterface $entity) {
95
+            ->displayIf(function(DBElementInterface $entity) {
96 96
                 return $this->isGranted('ROLE_VIEW_AUDITS');
97 97
             })
98 98
             ->setCssClass('ml-2 text-dark')
99
-            ->linkToRoute('dh_auditor_show_entity_history', function (DBElementInterface $entity) {
99
+            ->linkToRoute('dh_auditor_show_entity_history', function(DBElementInterface $entity) {
100 100
                 return [
101 101
                     'entity' => str_replace('\\', '-', get_class($entity)),
102 102
                     'id' => $entity->getId(),
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
         yield MenuItem::linkToCrud('user.labelp', 'fas fa-user', User::class)
243 243
             ->setPermission('ROLE_READ_USER');
244 244
 
245
-        $version = $this->app_version.'-'.$this->gitVersionInfo->getGitCommitHash() ?? '';
246
-        yield MenuItem::section('Version '.$version, 'fas fa-info');
245
+        $version = $this->app_version . '-' . $this->gitVersionInfo->getGitCommitHash() ?? '';
246
+        yield MenuItem::section('Version ' . $version, 'fas fa-info');
247 247
         yield MenuItem::linktoRoute('dashboard.menu.audits', 'fas fa-binoculars', 'dh_auditor_list_audits')
248 248
             ->setPermission('ROLE_VIEW_AUDITS');
249 249
         yield MenuItem::linktoRoute('dashboard.menu.homepage', 'fas fa-home', 'homepage');
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
             ->addMenuItems([
262 262
                 MenuItem::linktoRoute('user.settings.title', 'fas fa-user-cog', 'user_settings'),
263 263
                 //It is important to use LinkToUrl here. LinkToCrud will put the route name into a param, but does not change the prefix
264
-                MenuItem::linkToUrl(Languages::getName('de', 'de').' (DE)', '', '/de/admin'),
265
-                MenuItem::linkToUrl(Languages::getName('en', 'en').' (EN)', '', '/en/admin'),
264
+                MenuItem::linkToUrl(Languages::getName('de', 'de') . ' (DE)', '', '/de/admin'),
265
+                MenuItem::linkToUrl(Languages::getName('en', 'en') . ' (EN)', '', '/en/admin'),
266 266
             ]);
267 267
     }
268 268
 
Please login to merge, or discard this patch.
src/Controller/Admin/DepartmentCrudController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         ]);
91 91
 
92 92
         $generateTokenAction = Action::new('generateSkipToken', 'department.action.generate_skip_token', 'fas fa-award')
93
-            ->displayIf(function (Department $paymentOrder) {
93
+            ->displayIf(function(Department $paymentOrder) {
94 94
                 return $this->isGranted('ROLE_EDIT_ORGANISATIONS');
95 95
             })
96 96
             ->setCssClass('mr-2 text-dark')
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $choices = [];
116 116
         foreach (Department::ALLOWED_TYPES as $type) {
117
-            $choices['department.type.'.$type] = $type;
117
+            $choices['department.type.' . $type] = $type;
118 118
         }
119 119
 
120 120
         return [
Please login to merge, or discard this patch.