Skip to content

Commit

Permalink
update log() and validateIdP() method types in IdPDisco
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jun 14, 2024
1 parent f7be2a9 commit 158c240
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions modules/sildisco/src/IdPDisco.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,9 @@ class IdPDisco extends \SimpleSAML\XHTML\IdPDisco


/**
* Log a message.
*
* This is an helper function for logging messages. It will prefix the messages with our discovery service type.
*
* @param string $message The message which should be logged.
* @inheritDoc
*/
protected function log($message): void
protected function log(string $message): void
{
\SimpleSAML\Logger::info('SildiscoIdPDisco.'.$this->instance.': '.$message);
}
Expand Down Expand Up @@ -72,9 +68,7 @@ private function getSPEntityIDAndReducedIdpList(): array
}

/**
* Handles a request to this discovery service.
*
* The IdP disco parameters should be set before calling this function.
* @inheritDoc
*/
public function handleRequest(): void
{
Expand Down Expand Up @@ -160,16 +154,9 @@ public static function enableBetaEnabled(array $idpList, ?bool $isBetaTester=nul
}

/**
* Validates the given IdP entity id.
*
* Takes a string with the IdP entity id, and returns the entity id if it is valid, or
* null if not. Ensures that the selected IdP is allowed for the current SP
*
* @param string|null $idp The entity id we want to validate. This can be null, in which case we will return null.
*
* @return string|null The entity id if it is valid, null if not.
* @inheritDoc
*/
protected function validateIdP($idp): ?string
protected function validateIdP(?string $idp): ?string
{
if ($idp === null) {
return null;
Expand Down

0 comments on commit 158c240

Please sign in to comment.