Skip to content

Commit

Permalink
Merge pull request #585 from staabm/patch-1
Browse files Browse the repository at this point in the history
Declare conditional return types
  • Loading branch information
pitbulk authored Apr 26, 2024
2 parents 3553bc4 + 1d2d16e commit b58c5ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Saml2/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ public function processResponse($requestId = null)
* @param bool $stay True if we want to stay (returns the url string) False to redirect
*
* @return string|null
* @phpstan-return ($stay is true ? string : never)
*
* @throws OneLogin_Saml2_Error
*/
Expand Down Expand Up @@ -498,6 +499,7 @@ public function getAttributeWithFriendlyName($friendlyName)
* @param string $nameIdValueReq Indicates to the IdP the subject that should be authenticated
*
* @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
* @phpstan-return ($stay is true ? string : never)
*
* @throws OneLogin_Saml2_Error
*/
Expand Down Expand Up @@ -540,6 +542,7 @@ public function login($returnTo = null, $parameters = array(), $forceAuthn = fal
* @param string|null $nameIdNameQualifier The NameID NameQualifier will be set in the LogoutRequest.
*
* @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
* @phpstan-return ($stay is true ? string : never)
*
* @throws OneLogin_Saml2_Error
*/
Expand Down
1 change: 1 addition & 0 deletions lib/Saml2/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ public static function getStringBetween($str, $start, $end)
* @param bool $stay True if we want to stay (returns the url string) False to redirect
*
* @return string|null $url
* @phpstan-return ($stay is true ? string : never)
*
* @throws OneLogin_Saml2_Error
*/
Expand Down

0 comments on commit b58c5ee

Please sign in to comment.