@@ -23,7 +23,7 @@  | 
                                                    ||
| 23 | 23 | use Symplify\EasyCodingStandard\ValueObject\Set\SetList;  | 
                                                        
| 24 | 24 | use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;  | 
                                                        
| 25 | 25 | |
| 26 | -return static function (ContainerConfigurator $containerConfigurator): void { | 
                                                        |
| 26 | +return static function(ContainerConfigurator $containerConfigurator): void { | 
                                                        |
| 27 | 27 | $parameters = $containerConfigurator->parameters();  | 
                                                        
| 28 | 28 | $parameters->set(Option::SETS, [  | 
                                                        
| 29 | 29 | SetList::CLEAN_CODE,  | 
                                                        
@@ -1,5 +1,5 @@  | 
                                                    ||
| 1 | 1 | <?php  | 
                                                        
| 2 | 2 | |
| 3 | -if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) { | 
                                                        |
| 4 | - require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';  | 
                                                        |
| 3 | +if (file_exists(dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php')) { | 
                                                        |
| 4 | + require dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php';  | 
                                                        |
| 5 | 5 | }  | 
                                                        
@@ -49,7 +49,7 @@  | 
                                                    ||
| 49 | 49 |      { | 
                                                        
| 50 | 50 | $ipAddress = $this->request->getCurrentRequest()  | 
                                                        
| 51 | 51 | ->getClientIp();  | 
                                                        
| 52 | -        $this->logger->error('Authentication failed for IP: '.$ipAddress); | 
                                                        |
| 52 | +        $this->logger->error('Authentication failed for IP: ' . $ipAddress); | 
                                                        |
| 53 | 53 | }  | 
                                                        
| 54 | 54 | |
| 55 | 55 | public static function getSubscribedEvents(): array  | 
                                                        
@@ -99,7 +99,7 @@ discard block  | 
                                                    ||
| 99 | 99 | //Download as file  | 
                                                        
| 100 | 100 |                  if (1 === count($xml_files)) { | 
                                                        
| 101 | 101 | $xml_string = array_values($xml_files)[0];  | 
                                                        
| 102 | -                    $filename = 'export_'.date('Y-m-d_H-i-s').'.xml'; | 
                                                        |
| 102 | +                    $filename = 'export_' . date('Y-m-d_H-i-s') . '.xml'; | 
                                                        |
| 103 | 103 | $response = $this->getDownloadResponse($xml_string, $filename);  | 
                                                        
| 104 | 104 |                  } else { | 
                                                        
| 105 | 105 | $zip = new ZipArchive();  | 
                                                        
@@ -113,7 +113,7 @@ discard block  | 
                                                    ||
| 113 | 113 | $response = new BinaryFileResponse($file_path);  | 
                                                        
| 114 | 114 | $response->deleteFileAfterSend();  | 
                                                        
| 115 | 115 | $response->setPrivate();  | 
                                                        
| 116 | -                        $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'export_'.date('Y-m-d_H-i-s').'.zip'); | 
                                                        |
| 116 | +                        $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'export_' . date('Y-m-d_H-i-s') . '.zip'); | 
                                                        |
| 117 | 117 |                      } else { | 
                                                        
| 118 | 118 |                          throw new RuntimeException('Could not create a ZIP Archive.'); | 
                                                        
| 119 | 119 | }  | 
                                                        
@@ -130,7 +130,7 @@ discard block  | 
                                                    ||
| 130 | 130 | //Show error if auto mode is not possible  | 
                                                        
| 131 | 131 |                  $this->addFlash('danger', | 
                                                        
| 132 | 132 |                                  $this->translator->trans('sepa_export.error.department_missing_account') | 
                                                        
| 133 | - .': '.$exception->getWrongDepartment()->getName());  | 
                                                        |
| 133 | + .': ' . $exception->getWrongDepartment()->getName());  | 
                                                        |
| 134 | 134 | }  | 
                                                        
| 135 | 135 | }  | 
                                                        
| 136 | 136 | |
@@ -145,7 +145,7 @@ discard block  | 
                                                    ||
| 145 | 145 | $response = new Response();  | 
                                                        
| 146 | 146 |          $response->headers->set('Cache-Control', 'private'); | 
                                                        
| 147 | 147 |          $response->headers->set('Content-type', $mime_type); | 
                                                        
| 148 | -        $response->headers->set('Content-Disposition', 'attachment; filename="'.$filename.'";'); | 
                                                        |
| 148 | +        $response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '";'); | 
                                                        |
| 149 | 149 |          $response->headers->set('Content-length', strlen($content)); | 
                                                        
| 150 | 150 | $response->setContent($content);  | 
                                                        
| 151 | 151 | |
@@ -148,7 +148,7 @@ discard block  | 
                                                    ||
| 148 | 148 |              throw new RuntimeException('This controller only works only for Part-DB User objects!'); | 
                                                        
| 149 | 149 | }  | 
                                                        
| 150 | 150 | |
| 151 | -        if ($this->isCsrfTokenValid('regenerate_backup_codes'.$user->getId(), $request->request->get('_token'))) { | 
                                                        |
| 151 | +        if ($this->isCsrfTokenValid('regenerate_backup_codes' . $user->getId(), $request->request->get('_token'))) { | 
                                                        |
| 152 | 152 | $backupCodeManager->regenerateBackupCodes($user);  | 
                                                        
| 153 | 153 | $entityManager->flush();  | 
                                                        
| 154 | 154 |              $this->addFlash('success', 'user.settings.2fa.backup_codes.regenerated'); | 
                                                        
@@ -175,7 +175,7 @@ discard block  | 
                                                    ||
| 175 | 175 |              throw new RuntimeException('This controller only works only for Part-DB User objects!'); | 
                                                        
| 176 | 176 | }  | 
                                                        
| 177 | 177 | |
| 178 | -        if ($this->isCsrfTokenValid('devices_reset'.$user->getId(), $request->request->get('_token'))) { | 
                                                        |
| 178 | +        if ($this->isCsrfTokenValid('devices_reset' . $user->getId(), $request->request->get('_token'))) { | 
                                                        |
| 179 | 179 | $user->invalidateTrustedDevices();  | 
                                                        
| 180 | 180 | $entityManager->flush();  | 
                                                        
| 181 | 181 |              $this->addFlash('success', 'tfa_trustedDevice.invalidate.success'); | 
                                                        
@@ -68,7 +68,7 @@ discard block  | 
                                                    ||
| 68 | 68 |          //$menuItem->setQueryParameter('referrer', $referrer); | 
                                                        
| 69 | 69 | |
| 70 | 70 |          foreach ($filters as $filter => $value) { | 
                                                        
| 71 | -            $menuItem->setQueryParameter('filters['.$filter.']', $value); | 
                                                        |
| 71 | +            $menuItem->setQueryParameter('filters[' . $filter . ']', $value); | 
                                                        |
| 72 | 72 | }  | 
                                                        
| 73 | 73 | |
| 74 | 74 |          $menuItem->setQueryParameter('crudAction', 'index'); | 
                                                        
@@ -159,8 +159,8 @@ discard block  | 
                                                    ||
| 159 | 159 |          yield MenuItem::linkToCrud('user.labelp', 'fas fa-user', User::class) | 
                                                        
| 160 | 160 |              ->setPermission('ROLE_READ_USER'); | 
                                                        
| 161 | 161 | |
| 162 | - $version = $this->app_version.'-'.$this->gitVersionInfo->getGitCommitHash() ?? '';  | 
                                                        |
| 163 | -        yield MenuItem::section('Version '.$version, 'fas fa-info'); | 
                                                        |
| 162 | + $version = $this->app_version . '-' . $this->gitVersionInfo->getGitCommitHash() ?? '';  | 
                                                        |
| 163 | +        yield MenuItem::section('Version ' . $version, 'fas fa-info'); | 
                                                        |
| 164 | 164 |          yield MenuItem::linktoRoute('dashboard.menu.homepage', 'fas fa-home', 'homepage'); | 
                                                        
| 165 | 165 |          yield MenuItem::linkToUrl('dashboard.menu.stura', 'fab fa-rebel', 'https://www.stura.uni-jena.de/'); | 
                                                        
| 166 | 166 |          yield MenuItem::linkToUrl('dashboard.menu.github', 'fab fa-github', 'https://github.com/jbtronics/StuRa-Finanzsoftware'); | 
                                                        
@@ -175,8 +175,8 @@ discard block  | 
                                                    ||
| 175 | 175 | ->displayUserName(true)  | 
                                                        
| 176 | 176 | ->addMenuItems([  | 
                                                        
| 177 | 177 |                  MenuItem::linktoRoute('user.settings.title', 'fas fa-user-cog', 'user_settings'), | 
                                                        
| 178 | -                MenuItem::linktoRoute(Languages::getName('de', 'de').' (DE)', '', 'admin_dashboard.de'), | 
                                                        |
| 179 | -                MenuItem::linktoRoute(Languages::getName('en', 'en').' (EN)', '', 'admin_dashboard.en'), | 
                                                        |
| 178 | +                MenuItem::linktoRoute(Languages::getName('de', 'de') . ' (DE)', '', 'admin_dashboard.de'), | 
                                                        |
| 179 | +                MenuItem::linktoRoute(Languages::getName('en', 'en') . ' (EN)', '', 'admin_dashboard.en'), | 
                                                        |
| 180 | 180 | ]);  | 
                                                        
| 181 | 181 | }  | 
                                                        
| 182 | 182 | |
@@ -78,7 +78,7 @@  | 
                                                    ||
| 78 | 78 |      { | 
                                                        
| 79 | 79 | $choices = [];  | 
                                                        
| 80 | 80 |          foreach (Department::ALLOWED_TYPES as $type) { | 
                                                        
| 81 | - $choices['department.type.'.$type] = $type;  | 
                                                        |
| 81 | + $choices['department.type.' . $type] = $type;  | 
                                                        |
| 82 | 82 | }  | 
                                                        
| 83 | 83 | |
| 84 | 84 | return [  | 
                                                        
@@ -179,32 +179,32 @@ discard block  | 
                                                    ||
| 179 | 179 | ]);  | 
                                                        
| 180 | 180 | |
| 181 | 181 |          $emailAction = Action::new('sendEmail', 'payment_order.action.email', 'fas fa-envelope') | 
                                                        
| 182 | -            ->linkToUrl(function (PaymentOrder $paymentOrder) { | 
                                                        |
| 182 | +            ->linkToUrl(function(PaymentOrder $paymentOrder) { | 
                                                        |
| 183 | 183 | return $this->mailToGenerator->generateContactMailLink($paymentOrder);  | 
                                                        
| 184 | 184 | })  | 
                                                        
| 185 | 185 |              ->setCssClass('text-dark'); | 
                                                        
| 186 | 186 | |
| 187 | 187 | //Hide action if no contact emails are associated with department  | 
                                                        
| 188 | -        $emailAction->displayIf(function (PaymentOrder $paymentOrder) { | 
                                                        |
| 188 | +        $emailAction->displayIf(function(PaymentOrder $paymentOrder) { | 
                                                        |
| 189 | 189 | return null !== $this->mailToGenerator->generateContactMailLink($paymentOrder);  | 
                                                        
| 190 | 190 | });  | 
                                                        
| 191 | 191 | |
| 192 | 192 |          $hhv_action = Action::new('contactHHV', 'payment_order.action.contact_hhv', 'fas fa-comment-dots') | 
                                                        
| 193 | -            ->linkToUrl(function (PaymentOrder $paymentOrder) { | 
                                                        |
| 193 | +            ->linkToUrl(function(PaymentOrder $paymentOrder) { | 
                                                        |
| 194 | 194 | return $this->mailToGenerator->getHHVMailLink($paymentOrder);  | 
                                                        
| 195 | 195 | })  | 
                                                        
| 196 | 196 |              ->setCssClass('mr-2 text-dark'); | 
                                                        
| 197 | 197 | |
| 198 | 198 |          $resend_confirmation_action = Action::new('resendConfirmation', 'payment_order.action.resend_confirmation', 'fas fa-redo') | 
                                                        
| 199 | 199 |              ->linkToCrudAction('resendConfirmationEmail') | 
                                                        
| 200 | -            ->displayIf(function (PaymentOrder $paymentOrder) { | 
                                                        |
| 200 | +            ->displayIf(function(PaymentOrder $paymentOrder) { | 
                                                        |
| 201 | 201 |                  return $this->isGranted('ROLE_EDIT_PAYMENT_ORDERS') && (null === $paymentOrder->getConfirm2Timestamp() || null === $paymentOrder->getConfirm1Timestamp()); | 
                                                        
| 202 | 202 | })  | 
                                                        
| 203 | 203 |              ->setCssClass('mr-2 text-dark'); | 
                                                        
| 204 | 204 | |
| 205 | 205 |          $mathematically_correct_action = Action::new('mathematicallyCorrect', 'payment_order.action.mathematically_correct', 'fas fa-check') | 
                                                        
| 206 | 206 |              ->linkToCrudAction('checkMathematicallyCorrect') | 
                                                        
| 207 | -            ->displayIf(function (PaymentOrder $paymentOrder) { | 
                                                        |
| 207 | +            ->displayIf(function(PaymentOrder $paymentOrder) { | 
                                                        |
| 208 | 208 |                  return $this->isGranted('ROLE_PO_MATHEMATICALLY') | 
                                                        
| 209 | 209 | && $paymentOrder->isConfirmed()  | 
                                                        
| 210 | 210 | && !$paymentOrder->isMathematicallyCorrect();  | 
                                                        
@@ -213,7 +213,7 @@ discard block  | 
                                                    ||
| 213 | 213 | |
| 214 | 214 |          $factually_correct_action = Action::new('factuallyCorrect', 'payment_order.action.factually_correct', 'fas fa-check') | 
                                                        
| 215 | 215 |              ->linkToCrudAction('checkFactuallyCorrect') | 
                                                        
| 216 | -            ->displayIf(function (PaymentOrder $paymentOrder) { | 
                                                        |
| 216 | +            ->displayIf(function(PaymentOrder $paymentOrder) { | 
                                                        |
| 217 | 217 |                  return $this->isGranted('ROLE_PO_FACTUALLY') | 
                                                        
| 218 | 218 | && $paymentOrder->isConfirmed()  | 
                                                        
| 219 | 219 | && !$paymentOrder->isFactuallyCorrect()  | 
                                                        
@@ -311,7 +311,7 @@ discard block  | 
                                                    ||
| 311 | 311 | return $this->getFirstName();  | 
                                                        
| 312 | 312 | }  | 
                                                        
| 313 | 313 | |
| 314 | - return $this->getFirstName().' '.$this->getLastName();  | 
                                                        |
| 314 | + return $this->getFirstName() . ' ' . $this->getLastName();  | 
                                                        |
| 315 | 315 | }  | 
                                                        
| 316 | 316 | |
| 317 | 317 | /**  | 
                                                        
@@ -460,6 +460,6 @@ discard block  | 
                                                    ||
| 460 | 460 | |
| 461 | 461 | public function __toString(): string  | 
                                                        
| 462 | 462 |      { | 
                                                        
| 463 | -        return $this->getFullName().' ('.$this->username.')'; | 
                                                        |
| 463 | +        return $this->getFullName() . ' (' . $this->username . ')'; | 
                                                        |
| 464 | 464 | }  | 
                                                        
| 465 | 465 | }  |