Passed
Pull Request — master (#8)
by
unknown
10:12
created
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('btn btn-secondary')
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('btn btn-secondary')
@@ -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.
src/Controller/Admin/PaymentOrderCrudController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             $project_name = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $project_name);
130 130
             $project_name = mb_ereg_replace("([\.]{2,})", '', $project_name);
131 131
             //Format: "ZA000001 Project Name.pdf"
132
-            $filename = $prefix.$payment_order->getIDString().' '.$project_name.'.'.$extension;
132
+            $filename = $prefix . $payment_order->getIDString() . ' ' . $project_name . '.' . $extension;
133 133
 
134 134
             $data[$filename] = $path;
135 135
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
         return ZIPBinaryFileResponseFacade::createZIPResponseFromFiles(
148 148
             $data,
149
-            'Belege_'.date('Y-m-d_H-i-s').'.zip');
149
+            'Belege_' . date('Y-m-d_H-i-s') . '.zip');
150 150
     }
151 151
 
152 152
     public function configureCrud(Crud $crud): Crud
@@ -315,32 +315,32 @@  discard block
 block discarded – undo
315 315
         ]);
316 316
 
317 317
         $emailAction = Action::new('sendEmail', 'payment_order.action.email', 'fas fa-envelope')
318
-            ->linkToUrl(function (PaymentOrder $paymentOrder) {
318
+            ->linkToUrl(function(PaymentOrder $paymentOrder) {
319 319
                 return $this->mailToGenerator->generateContactMailLink($paymentOrder);
320 320
             })
321 321
             ->setCssClass('btn btn-secondary text-dark');
322 322
 
323 323
         //Hide action if no contact emails are associated with department
324
-        $emailAction->displayIf(function (PaymentOrder $paymentOrder) {
324
+        $emailAction->displayIf(function(PaymentOrder $paymentOrder) {
325 325
             return null !== $this->mailToGenerator->generateContactMailLink($paymentOrder);
326 326
         });
327 327
 
328 328
         $hhv_action = Action::new('contactHHV', 'payment_order.action.contact_hhv', 'fas fa-comment-dots')
329
-            ->linkToUrl(function (PaymentOrder $paymentOrder) {
329
+            ->linkToUrl(function(PaymentOrder $paymentOrder) {
330 330
                 return $this->mailToGenerator->getHHVMailLink($paymentOrder);
331 331
             })
332 332
             ->setCssClass('btn btn-secondary text-dark');
333 333
 
334 334
         $resend_confirmation_action = Action::new('resendConfirmation', 'payment_order.action.resend_confirmation', 'fas fa-redo')
335 335
             ->linkToCrudAction('resendConfirmationEmail')
336
-            ->displayIf(function (PaymentOrder $paymentOrder) {
336
+            ->displayIf(function(PaymentOrder $paymentOrder) {
337 337
                 return $this->isGranted('ROLE_EDIT_PAYMENT_ORDERS') && !$paymentOrder->isConfirmed();
338 338
             })
339 339
             ->setCssClass('btn btn-secondary text-dark');
340 340
 
341 341
         $mathematically_correct_action = Action::new('mathematicallyCorrect', 'payment_order.action.mathematically_correct', 'fas fa-check')
342 342
             ->linkToCrudAction('checkMathematicallyCorrect')
343
-            ->displayIf(function (PaymentOrder $paymentOrder) {
343
+            ->displayIf(function(PaymentOrder $paymentOrder) {
344 344
                 return $this->isGranted('ROLE_PO_MATHEMATICALLY')
345 345
                     && $paymentOrder->isConfirmed()
346 346
                     && !$paymentOrder->isMathematicallyCorrect();
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 
350 350
         $factually_correct_action = Action::new('factuallyCorrect', 'payment_order.action.factually_correct', 'fas fa-check')
351 351
             ->linkToCrudAction('checkFactuallyCorrect')
352
-            ->displayIf(function (PaymentOrder $paymentOrder) {
352
+            ->displayIf(function(PaymentOrder $paymentOrder) {
353 353
                 return $this->isGranted('ROLE_PO_FACTUALLY')
354 354
                     && $paymentOrder->isConfirmed()
355 355
                     && !$paymentOrder->isFactuallyCorrect()
@@ -359,12 +359,12 @@  discard block
 block discarded – undo
359 359
 
360 360
         $manual_confirmation = Action::new('manual_confirmation', 'payment_order.action.manual_confirmation', 'fas fa-exclamation-triangle')
361 361
             ->setCssClass('btn btn-secondary')
362
-            ->linkToRoute('payment_order_manual_confirm', function (PaymentOrder $paymentOrder) {
362
+            ->linkToRoute('payment_order_manual_confirm', function(PaymentOrder $paymentOrder) {
363 363
                 return [
364 364
                     'id' => $paymentOrder->getId(),
365 365
                 ];
366 366
             })
367
-            ->displayIf(function (PaymentOrder $paymentOrder) {
367
+            ->displayIf(function(PaymentOrder $paymentOrder) {
368 368
                 return $this->isGranted('ROLE_MANUAL_CONFIRMATION')
369 369
                     && !$paymentOrder->isConfirmed();
370 370
             });
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 
378 378
         $actions->disable(Crud::PAGE_NEW);
379 379
 
380
-        if(!$this->isGranted('ROLE_EDIT_PAYMENT_ORDERS')) {
380
+        if (!$this->isGranted('ROLE_EDIT_PAYMENT_ORDERS')) {
381 381
             $actions->disable('batchDelete');
382 382
         }
383 383
 
Please login to merge, or discard this patch.
src/Controller/PaymentOrderController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
      */
178 178
     public function confirmation(?PaymentOrder $paymentOrder, Request $request, EntityManagerInterface $em): Response
179 179
     {
180
-        if($paymentOrder === null) {
180
+        if ($paymentOrder === null) {
181 181
             $this->addFlash('error', 'payment_order.can_not_be_found');
182 182
             return $this->redirectToRoute('homepage');
183 183
         }
Please login to merge, or discard this patch.