@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Symfony\Component\Dotenv\Dotenv; |
| 4 | 4 | |
| 5 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
| 5 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Removed the dotenv parsing from this file to support the legacy parameters.yml config to prevent refactoring the configuration in Deploy |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $configuration = new Configuration(); |
| 44 | 44 | $config = $this->processConfiguration($configuration, $configs); |
| 45 | 45 | |
| 46 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 46 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 47 | 47 | $loader->load('services.yml'); |
| 48 | 48 | $loader->load('security.yml'); |
| 49 | 49 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | ]); |
| 37 | 37 | $builder->add('verifySecret', SubmitType::class, [ |
| 38 | 38 | 'label' => 'ss.form.ss_authenticate_safe_store_type.button.continue', |
| 39 | - 'attr' => [ 'class' => 'btn btn-primary pull-right' ], |
|
| 39 | + 'attr' => ['class' => 'btn btn-primary pull-right'], |
|
| 40 | 40 | ]); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | ]); |
| 39 | 39 | $builder->add('resendChallenge', AnchorType::class, [ |
| 40 | 40 | 'label' => 'ss.form.ss_verify_sms_challenge.button.resend_challenge', |
| 41 | - 'attr' => [ 'class' => 'btn btn-default' ], |
|
| 41 | + 'attr' => ['class' => 'btn btn-default'], |
|
| 42 | 42 | 'route' => $options['data']->resendRoute, |
| 43 | 43 | 'route_parameters' => $options['data']->resendRouteParameters, |
| 44 | 44 | ]); |
| 45 | 45 | $builder->add('verifyChallenge', SubmitType::class, [ |
| 46 | 46 | 'label' => 'ss.form.ss_verify_sms_challenge.button.verify_challenge', |
| 47 | - 'attr' => [ 'class' => 'btn btn-primary pull-right' ], |
|
| 47 | + 'attr' => ['class' => 'btn btn-primary pull-right'], |
|
| 48 | 48 | ]); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | ]) |
| 51 | 51 | ->add('sendChallenge', SubmitType::class, [ |
| 52 | 52 | 'label' => 'ss.form.ss_send_sms_challenge.button.send_challenge', |
| 53 | - 'attr' => [ 'class' => 'btn btn-primary pull-right' ], |
|
| 53 | + 'attr' => ['class' => 'btn btn-primary pull-right'], |
|
| 54 | 54 | ]); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | ]) |
| 39 | 39 | ->add('confirm', SubmitType::class, [ |
| 40 | 40 | 'label' => 'ss.form.recovery_token.button.confirm', |
| 41 | - 'attr' => [ 'class' => 'btn btn-primary pull-right' ], |
|
| 41 | + 'attr' => ['class' => 'btn btn-primary pull-right'], |
|
| 42 | 42 | ]); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | ]); |
| 39 | 39 | $builder->add('verifyEmail', SubmitType::class, [ |
| 40 | 40 | 'label' => 'ss.form.ss_verify_email.button.verify_email', |
| 41 | - 'attr' => [ 'class' => 'btn btn-primary' ], |
|
| 41 | + 'attr' => ['class' => 'btn btn-primary'], |
|
| 42 | 42 | ]); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $builder->add('revoke', SubmitType::class, [ |
| 31 | 31 | 'label' => 'ss.form.ss_revoke_second_factor.revoke', |
| 32 | - 'attr' => [ 'class' => 'btn btn-danger pull-right' ], |
|
| 32 | + 'attr' => ['class' => 'btn btn-danger pull-right'], |
|
| 33 | 33 | ]); |
| 34 | 34 | $builder->add('cancel', AnchorType::class, [ |
| 35 | 35 | 'label' => 'ss.form.ss_revoke_second_factor.cancel', |
| 36 | - 'attr' => [ 'class' => 'btn pull-right' ], |
|
| 36 | + 'attr' => ['class' => 'btn pull-right'], |
|
| 37 | 37 | 'route' => 'ss_second_factor_list', |
| 38 | 38 | ]); |
| 39 | 39 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | $configuration = new Configuration(); |
| 51 | 51 | $config = $this->processConfiguration($configuration, $configs); |
| 52 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 52 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 53 | 53 | $loader->load('services.yml'); |
| 54 | 54 | |
| 55 | 55 | foreach ($config['providers'] as $provider => $providerConfiguration) { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $hostedDefinition = $this->buildHostedEntityDefinition($provider, $configuration, $routes); |
| 155 | 155 | $container->setDefinition('gssp.provider.' . $provider . '.hosted_entities', $hostedDefinition); |
| 156 | 156 | |
| 157 | - $hostedSpDefinition = (new Definition()) |
|
| 157 | + $hostedSpDefinition = (new Definition()) |
|
| 158 | 158 | ->setClass(\Surfnet\SamlBundle\Entity\ServiceProvider::class) |
| 159 | 159 | ->setFactory([ |
| 160 | 160 | new Reference('gssp.provider.' . $provider . '.hosted_entities'), |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | private function createRemoteDefinition(string $provider, array $configuration, ContainerBuilder $container): void |
| 194 | 194 | { |
| 195 | - $definition = new Definition(IdentityProvider::class, [ |
|
| 195 | + $definition = new Definition(IdentityProvider::class, [ |
|
| 196 | 196 | [ |
| 197 | 197 | 'entityId' => $configuration['entity_id'], |
| 198 | 198 | 'ssoUrl' => $configuration['sso_url'], |
@@ -249,14 +249,14 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | private function validateDescriptions($descriptions, $appUrl, $provider, string $type): void |
| 251 | 251 | { |
| 252 | - $regex ="/%%{$type}_link_start%%[a-zA-Z0-9 ]+%%{$type}_link_end%%/"; |
|
| 252 | + $regex = "/%%{$type}_link_start%%[a-zA-Z0-9 ]+%%{$type}_link_end%%/"; |
|
| 253 | 253 | foreach ($descriptions as $lang => $description) { |
| 254 | 254 | if ($appUrl !== false && preg_match($regex, (string) $description) === 0) { |
| 255 | 255 | throw new InvalidConfigurationException( |
| 256 | 256 | sprintf( |
| 257 | 257 | 'You have configured a GSSP provider with app URL\'s but the description is not ' . |
| 258 | 258 | 'configured correctly yet. Missing "%%%1$s_link_start%%" or "%%%1$s_link_end%%" in ' . |
| 259 | - 'GSSP description for language "%2$s" in "providers.%3$s.view_config.description" of '. |
|
| 259 | + 'GSSP description for language "%2$s" in "providers.%3$s.view_config.description" of ' . |
|
| 260 | 260 | 'samlstepupproviders.yml', |
| 261 | 261 | $type, |
| 262 | 262 | $lang, |