@@ -14,24 +14,24 @@ |
||
| 14 | 14 | protected function configureContainer(ContainerConfigurator $container): void |
| 15 | 15 | { |
| 16 | 16 | $container->import('../config/{packages}/*.yaml'); |
| 17 | - $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); |
|
| 17 | + $container->import('../config/{packages}/' . $this->environment . '/*.yaml'); |
|
| 18 | 18 | |
| 19 | - if (is_file(\dirname(__DIR__).'/config/services.yaml')) { |
|
| 19 | + if (is_file(\dirname(__DIR__) . '/config/services.yaml')) { |
|
| 20 | 20 | $container->import('../config/services.yaml'); |
| 21 | - $container->import('../config/{services}_'.$this->environment.'.yaml'); |
|
| 22 | - } elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) { |
|
| 21 | + $container->import('../config/{services}_' . $this->environment . '.yaml'); |
|
| 22 | + } elseif (is_file($path = \dirname(__DIR__) . '/config/services.php')) { |
|
| 23 | 23 | (require $path)($container->withPath($path), $this); |
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | protected function configureRoutes(RoutingConfigurator $routes): void |
| 28 | 28 | { |
| 29 | - $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); |
|
| 29 | + $routes->import('../config/{routes}/' . $this->environment . '/*.yaml'); |
|
| 30 | 30 | $routes->import('../config/{routes}/*.yaml'); |
| 31 | 31 | |
| 32 | - if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { |
|
| 32 | + if (is_file(\dirname(__DIR__) . '/config/routes.yaml')) { |
|
| 33 | 33 | $routes->import('../config/routes.yaml'); |
| 34 | - } elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) { |
|
| 34 | + } elseif (is_file($path = \dirname(__DIR__) . '/config/routes.php')) { |
|
| 35 | 35 | (require $path)($routes->withPath($path), $this); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -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 | } |