Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare conditional return types #585

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading