@@ -56,8 +56,8 @@ |
||
56 | 56 | 'data-mode-manual' => true, |
57 | 57 | ], |
58 | 58 | 'placeholder' => 'sepa_export.bank_account.placeholder', |
59 | - 'choice_label' => function (BankAccount $account) { |
|
60 | - return $account->getExportAccountName().' ['.$account->getIban().']'; |
|
59 | + 'choice_label' => function(BankAccount $account) { |
|
60 | + return $account->getExportAccountName() . ' [' . $account->getIban() . ']'; |
|
61 | 61 | }, |
62 | 62 | ]); |
63 | 63 |
@@ -49,8 +49,8 @@ |
||
49 | 49 | ], |
50 | 50 | ]); |
51 | 51 | |
52 | - $resolver->setDefault('group_by', function (Department $choice, $key, $value) { |
|
53 | - return $this->translator->trans('department.type.'.$choice->getType() ?? 'misc'); |
|
52 | + $resolver->setDefault('group_by', function(Department $choice, $key, $value) { |
|
53 | + return $this->translator->trans('department.type.' . $choice->getType() ?? 'misc'); |
|
54 | 54 | }); |
55 | 55 | } |
56 | 56 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | public function configureOptions(OptionsResolver $resolver): void |
93 | 93 | { |
94 | 94 | $resolver->setDefaults([ |
95 | - 'data_class' => User::class, |
|
96 | - ]); |
|
95 | + 'data_class' => User::class, |
|
96 | + ]); |
|
97 | 97 | } |
98 | 98 | } |
@@ -39,7 +39,7 @@ |
||
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(); |
@@ -63,12 +63,12 @@ |
||
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 |
@@ -65,7 +65,7 @@ |
||
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; |
@@ -56,7 +56,7 @@ |
||
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); |
@@ -40,6 +40,6 @@ |
||
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 | } |
@@ -120,26 +120,26 @@ |
||
120 | 120 | |
121 | 121 | private function is_cli(): bool |
122 | 122 | { |
123 | - if ( defined('STDIN') ) |
|
123 | + if (defined('STDIN')) |
|
124 | 124 | { |
125 | 125 | return true; |
126 | 126 | } |
127 | 127 | |
128 | - if ( php_sapi_name() === 'cli' ) |
|
128 | + if (php_sapi_name() === 'cli') |
|
129 | 129 | { |
130 | 130 | return true; |
131 | 131 | } |
132 | 132 | |
133 | - if ( array_key_exists('SHELL', $_ENV) ) { |
|
133 | + if (array_key_exists('SHELL', $_ENV)) { |
|
134 | 134 | return true; |
135 | 135 | } |
136 | 136 | |
137 | - if ( empty($_SERVER['REMOTE_ADDR']) and !isset($_SERVER['HTTP_USER_AGENT']) and count($_SERVER['argv']) > 0) |
|
137 | + if (empty($_SERVER['REMOTE_ADDR']) and !isset($_SERVER['HTTP_USER_AGENT']) and count($_SERVER['argv']) > 0) |
|
138 | 138 | { |
139 | 139 | return true; |
140 | 140 | } |
141 | 141 | |
142 | - if ( !array_key_exists('REQUEST_METHOD', $_SERVER) ) |
|
142 | + if (!array_key_exists('REQUEST_METHOD', $_SERVER)) |
|
143 | 143 | { |
144 | 144 | return true; |
145 | 145 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | //$menuItem->setQueryParameter('referrer', $referrer); |
72 | 72 | |
73 | 73 | foreach ($filters as $filter => $value) { |
74 | - $menuItem->setQueryParameter('filters['.$filter.']', $value); |
|
74 | + $menuItem->setQueryParameter('filters[' . $filter . ']', $value); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $menuItem->setQueryParameter('crudAction', 'index'); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $actions = parent::configureActions(); |
85 | 85 | |
86 | 86 | $showLog = Action::new('showLog', 'action.show_logs', 'fas fa-binoculars') |
87 | - ->displayIf(function (DBElementInterface $entity) { |
|
87 | + ->displayIf(function(DBElementInterface $entity) { |
|
88 | 88 | return $this->isGranted('ROLE_VIEW_AUDITS'); |
89 | 89 | }) |
90 | 90 | ->setCssClass('ml-2 text-dark') |
@@ -183,8 +183,8 @@ discard block |
||
183 | 183 | yield MenuItem::linkToCrud('user.labelp', 'fas fa-user', User::class) |
184 | 184 | ->setPermission('ROLE_READ_USER'); |
185 | 185 | |
186 | - $version = $this->app_version.'-'.$this->gitVersionInfo->getGitCommitHash() ?? ''; |
|
187 | - yield MenuItem::section('Version '.$version, 'fas fa-info'); |
|
186 | + $version = $this->app_version . '-' . $this->gitVersionInfo->getGitCommitHash() ?? ''; |
|
187 | + yield MenuItem::section('Version ' . $version, 'fas fa-info'); |
|
188 | 188 | yield MenuItem::linktoRoute('dashboard.menu.audits', 'fas fa-binoculars', 'dh_auditor_list_audits') |
189 | 189 | ->setPermission('ROLE_VIEW_AUDITS'); |
190 | 190 | yield MenuItem::linktoRoute('dashboard.menu.homepage', 'fas fa-home', 'homepage'); |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | ->displayUserName(true) |
202 | 202 | ->addMenuItems([ |
203 | 203 | MenuItem::linktoRoute('user.settings.title', 'fas fa-user-cog', 'user_settings'), |
204 | - MenuItem::linktoRoute(Languages::getName('de', 'de').' (DE)', '', 'admin_dashboard.de'), |
|
205 | - MenuItem::linktoRoute(Languages::getName('en', 'en').' (EN)', '', 'admin_dashboard.en'), |
|
204 | + MenuItem::linktoRoute(Languages::getName('de', 'de') . ' (DE)', '', 'admin_dashboard.de'), |
|
205 | + MenuItem::linktoRoute(Languages::getName('en', 'en') . ' (EN)', '', 'admin_dashboard.en'), |
|
206 | 206 | ]); |
207 | 207 | } |
208 | 208 |