|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +declare(strict_types=1); |
| 4 | + |
3 | 5 | /** |
4 | | - * This script loads all the metadata and finds the one which |
5 | | - * is closest to expiration. Then it sends the time to expiration |
6 | | - * to the template. |
| 6 | + * This script loads all the metadata and finds the one which is closest to expiration. Then it sends the time to |
| 7 | + * expiration to the template. |
7 | 8 | * |
8 | 9 | * This can be used to check whether the meta refresh works without problems. |
9 | 10 | */ |
|
13 | 14 |
|
14 | 15 | $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); |
15 | 16 |
|
16 | | -$metaentries = ['hosted' => [], 'remote' => [] ]; |
| 17 | +$metaentries = [ |
| 18 | + 'hosted' => [], |
| 19 | + 'remote' => [], |
| 20 | +]; |
17 | 21 | $metaentries['remote']['saml20-idp-remote'] = $metadata->getList('saml20-idp-remote'); |
18 | 22 | $metaentries['remote']['shib13-idp-remote'] = $metadata->getList('shib13-idp-remote'); |
19 | 23 |
|
20 | | -if ($config->getBoolean('enable.saml20-idp', FALSE) === true) { |
| 24 | +if ($config->getBoolean('enable.saml20-idp', false) === true) { |
21 | 25 | try { |
22 | 26 | $metaentries['remote']['saml20-sp-remote'] = $metadata->getList('saml20-sp-remote'); |
23 | | - } catch(Exception $e) { |
| 27 | + } catch (Exception $e) { |
24 | 28 | SimpleSAML\Logger::error('Federation: Error loading saml20-idp: ' . $e->getMessage()); |
25 | 29 | } |
26 | 30 | } |
27 | 31 |
|
28 | | -if ($config->getBoolean('enable.shib13-idp', FALSE) === true) { |
| 32 | +if ($config->getBoolean('enable.shib13-idp', false) === true) { |
29 | 33 | try { |
30 | 34 | $metaentries['remote']['shib13-sp-remote'] = $metadata->getList('shib13-sp-remote'); |
31 | | - } catch(Exception $e) { |
| 35 | + } catch (Exception $e) { |
32 | 36 | SimpleSAML\Logger::error('Federation: Error loading shib13-idp: ' . $e->getMessage()); |
33 | 37 | } |
34 | 38 | } |
35 | 39 |
|
36 | | -if ($config->getBoolean('enable.adfs-idp', FALSE) === true) { |
| 40 | +if ($config->getBoolean('enable.adfs-idp', false) === true) { |
37 | 41 | try { |
38 | 42 | $metaentries['remote']['adfs-sp-remote'] = $metadata->getList('adfs-sp-remote'); |
39 | | - } catch(Exception $e) { |
| 43 | + } catch (Exception $e) { |
40 | 44 | SimpleSAML\Logger::error('Federation: Error loading adfs-idp: ' . $e->getMessage()); |
41 | 45 | } |
42 | 46 | } |
|
0 commit comments