Skip to content

Commit cc6c4ab

Browse files
committed
Adopt SSP coding-style
1 parent 08acc5f commit cc6c4ab

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

src/Controller/MetaRefresh.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function setAuthUtils(Utils\Auth $authUtils): void
5757
$this->authUtils = $authUtils;
5858
}
5959

60+
6061
/**
6162
* Inject the \SimpleSAML\Configuration dependency.
6263
*
@@ -67,6 +68,7 @@ public function setModuleConfig(Configuration $module_config): void
6768
$this->module_config = $module_config;
6869
}
6970

71+
7072
/**
7173
* @return \SimpleSAML\XHTML\Template
7274
*/

src/MetaLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ private function containsArray($src, $dst): bool
371371
}
372372
}
373373

374+
374375
/**
375376
* Create HTTP context, with any available caches taken into account
376377
*
@@ -402,6 +403,7 @@ private function createContext(array $source): array
402403
return ['http' => ['header' => $rawheader]];
403404
}
404405

406+
405407
private function addCachedMetadata(array $source): void
406408
{
407409
if (!isset($this->oldMetadataSrc)) {

src/MetaRefresh.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,18 @@ class MetaRefresh
2121
*/
2222
private Configuration $modconfig;
2323

24+
2425
/**
25-
* @param \SimpleSAML\Configuration $config The configuration to use by the module.
26-
* @param \SimpleSAML\Configuration $modconfig The module-specific configuration to use by the module.
26+
* @param \SimpleSAML\Configuration $config The configuration to use by the module.
27+
* @param \SimpleSAML\Configuration $modconfig The module-specific configuration to use by the module.
2728
*/
2829
public function __construct(Configuration $config, Configuration $modconfig)
2930
{
3031
$this->config = $config;
3132
$this->modconfig = $modconfig;
3233
}
3334

35+
3436
/**
3537
* @param string|null $crontag Only refresh sets which allow this crontag
3638
*/

tests/src/MetaLoaderTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ final class MetaLoaderTest extends TestCase
7474
'tags' => ['my-tag'],
7575
];
7676

77+
7778
protected function setUp(): void
7879
{
7980
$this->config = Configuration::loadFromArray(
@@ -87,6 +88,7 @@ protected function setUp(): void
8788
$this->source['src'] = dirname(__FILE__, 2) . '/testmetadata.xml';
8889
}
8990

91+
9092
protected function tearDown(): void
9193
{
9294
if ($this->tmpdir && is_dir($this->tmpdir)) {
@@ -97,6 +99,7 @@ protected function tearDown(): void
9799
}
98100
}
99101

102+
100103
public function testMetaLoader(): void
101104
{
102105
$this->metaloader->loadSource($this->source);
@@ -121,6 +124,7 @@ public function testMetaLoader(): void
121124
);
122125
}
123126

127+
124128
public function testSignatureVerificationCertificatePass(): void
125129
{
126130
$this->metaloader->loadSource(
@@ -130,6 +134,7 @@ public function testSignatureVerificationCertificatePass(): void
130134
$this->expectOutputRegex('/UTEbMBkGA1UECgwSRXhhbXBsZSBVbml2ZXJzaXR5MRgwFgYDVQQDDA9pZHAuZXhh/');
131135
}
132136

137+
133138
public function testWriteMetadataFiles(): void
134139
{
135140
$this->tmpdir = tempnam(sys_get_temp_dir(), 'SSP:tests:metarefresh:');
@@ -149,6 +154,7 @@ public function testWriteMetadataFiles(): void
149154
);
150155
}
151156

157+
152158
/**
153159
* Tests that setting an explicit expiry time will be added to the resulting
154160
* metadata when the original metadata lacks one.
@@ -175,7 +181,8 @@ public function testMetaLoaderSetExpiryWhenNotPresent(): void
175181
$this->assertEquals(1000, $metadata['https://idp.example.com/idp/shibboleth']['expire']);
176182
}
177183

178-
/*
184+
185+
/**
179186
* Test two matching EntityAttributes (R&S + Sirtfi)
180187
*/
181188
public function testAttributewhitelist1(): void
@@ -211,7 +218,8 @@ public function testAttributewhitelist1(): void
211218
);
212219
}
213220

214-
/*
221+
222+
/**
215223
* Test non-matching of the whitelist: result should be empty set
216224
*/
217225
public function testAttributewhitelist2(): void
@@ -234,7 +242,8 @@ public function testAttributewhitelist2(): void
234242
$this->assertEmpty($output);
235243
}
236244

237-
/*
245+
246+
/**
238247
* Test non-matching of first entry, but matching of second, using both
239248
* RegistrationInfo and EntityAttributes
240249
*/

0 commit comments

Comments
 (0)