@@ -75,7 +75,7 @@ |
||
75 | 75 | sprintf( |
76 | 76 | 'Unable to insert the new SP saml_entity. PDO raised this error: "%s"', |
77 | 77 | $stmt->errorInfo()[2] |
78 | - ) |
|
78 | + ) |
|
79 | 79 | ); |
80 | 80 | } else { |
81 | 81 | // Return the SP data |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | use Symfony\Component\Yaml\Yaml; |
4 | 4 | |
5 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
6 | -$parametersPath = dirname(__DIR__).'/config/openconext/parameters.yaml'; |
|
5 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
6 | +$parametersPath = dirname(__DIR__) . '/config/openconext/parameters.yaml'; |
|
7 | 7 | $parameters = Yaml::parseFile($parametersPath); |
8 | 8 | $parameters = $parameters['parameters']; |
9 | 9 | $requiredParameters = ['app_env', 'app_debug', 'app_secret']; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | use App\Kernel; |
3 | 3 | |
4 | -require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; |
|
5 | -require_once dirname(__DIR__).'/config/bootstrap.php'; |
|
4 | +require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; |
|
5 | +require_once dirname(__DIR__) . '/config/bootstrap.php'; |
|
6 | 6 | |
7 | -return function (array $context) { |
|
7 | +return function(array $context) { |
|
8 | 8 | return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); |
9 | 9 | }; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | ->scalarNode('http_basic_realm') |
35 | 35 | ->defaultValue('Secure Gateway API') |
36 | 36 | ->validate() |
37 | - ->ifTrue(function ($realm) { |
|
37 | + ->ifTrue(function($realm) { |
|
38 | 38 | return !is_string($realm) || empty($realm); |
39 | 39 | }) |
40 | 40 | ->thenInvalid("Invalid HTTP Basic realm '%s'. Must be string and non-empty.") |
@@ -140,7 +140,7 @@ |
||
140 | 140 | |
141 | 141 | $httpResponse = (new Response)->setContent( |
142 | 142 | $this->templateEngine->render( |
143 | - '@default/gateway/'.$view.'.html.twig', |
|
143 | + '@default/gateway/' . $view . '.html.twig', |
|
144 | 144 | $parameters |
145 | 145 | ) |
146 | 146 | ); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | * {@inheritdoc} the gelf message is an array which cannot be logged into a single line |
42 | 42 | * By jsonencoding the message we can write it on a single line |
43 | 43 | */ |
44 | - public function format(array|LogRecord $record) |
|
44 | + public function format(array | LogRecord $record) |
|
45 | 45 | { |
46 | 46 | $message = $this->formatter->format($record); |
47 | 47 |
@@ -86,20 +86,20 @@ |
||
86 | 86 | private function isValidResponseStatus(string $status): bool |
87 | 87 | { |
88 | 88 | return in_array($status, [ |
89 | - Constants::STATUS_SUCCESS, // weeee! |
|
90 | - Constants::STATUS_REQUESTER, // Something is wrong with the AuthnRequest |
|
91 | - Constants::STATUS_RESPONDER, // Something went wrong with the Response |
|
92 | - Constants::STATUS_VERSION_MISMATCH, // The version of the request message was incorrect |
|
89 | + Constants::STATUS_SUCCESS, // weeee! |
|
90 | + Constants::STATUS_REQUESTER, // Something is wrong with the AuthnRequest |
|
91 | + Constants::STATUS_RESPONDER, // Something went wrong with the Response |
|
92 | + Constants::STATUS_VERSION_MISMATCH, // The version of the request message was incorrect |
|
93 | 93 | ]); |
94 | 94 | } |
95 | 95 | |
96 | 96 | private function isValidResponseSubStatus($subStatus): bool |
97 | 97 | { |
98 | 98 | return in_array($subStatus, [ |
99 | - Constants::STATUS_AUTHN_FAILED, // failed authentication |
|
99 | + Constants::STATUS_AUTHN_FAILED, // failed authentication |
|
100 | 100 | Constants::STATUS_INVALID_ATTR, |
101 | 101 | Constants::STATUS_INVALID_NAMEID_POLICY, |
102 | - Constants::STATUS_NO_AUTHN_CONTEXT, // insufficient Loa or Loa cannot be met |
|
102 | + Constants::STATUS_NO_AUTHN_CONTEXT, // insufficient Loa or Loa cannot be met |
|
103 | 103 | Constants::STATUS_NO_AVAILABLE_IDP, |
104 | 104 | Constants::STATUS_NO_PASSIVE, |
105 | 105 | Constants::STATUS_NO_SUPPORTED_IDP, |
@@ -236,7 +236,7 @@ |
||
236 | 236 | public function render($view, array $parameters = [], ?Response $response = null): Response |
237 | 237 | { |
238 | 238 | return parent::render( |
239 | - '@default/gateway/'.$view.'.html.twig', |
|
239 | + '@default/gateway/' . $view . '.html.twig', |
|
240 | 240 | $parameters, |
241 | 241 | $response, |
242 | 242 | ); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | /** |
44 | 44 | * @return array View parameters 'title' and 'description' |
45 | 45 | */ |
46 | - protected function getPageTitleAndDescription(\Exception|Throwable $exception): array |
|
46 | + protected function getPageTitleAndDescription(\Exception | Throwable $exception): array |
|
47 | 47 | { |
48 | 48 | $translator = $this->getTranslator(); |
49 | 49 |