Skip to content

Commit b58c5ee

Browse files
authored
Merge pull request #585 from staabm/patch-1
Declare conditional return types
2 parents 3553bc4 + 1d2d16e commit b58c5ee

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/Saml2/Auth.php

+3
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ public function processResponse($requestId = null)
246246
* @param bool $stay True if we want to stay (returns the url string) False to redirect
247247
*
248248
* @return string|null
249+
* @phpstan-return ($stay is true ? string : never)
249250
*
250251
* @throws OneLogin_Saml2_Error
251252
*/
@@ -498,6 +499,7 @@ public function getAttributeWithFriendlyName($friendlyName)
498499
* @param string $nameIdValueReq Indicates to the IdP the subject that should be authenticated
499500
*
500501
* @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
502+
* @phpstan-return ($stay is true ? string : never)
501503
*
502504
* @throws OneLogin_Saml2_Error
503505
*/
@@ -540,6 +542,7 @@ public function login($returnTo = null, $parameters = array(), $forceAuthn = fal
540542
* @param string|null $nameIdNameQualifier The NameID NameQualifier will be set in the LogoutRequest.
541543
*
542544
* @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
545+
* @phpstan-return ($stay is true ? string : never)
543546
*
544547
* @throws OneLogin_Saml2_Error
545548
*/

lib/Saml2/Utils.php

+1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ public static function getStringBetween($str, $start, $end)
300300
* @param bool $stay True if we want to stay (returns the url string) False to redirect
301301
*
302302
* @return string|null $url
303+
* @phpstan-return ($stay is true ? string : never)
303304
*
304305
* @throws OneLogin_Saml2_Error
305306
*/

0 commit comments

Comments
 (0)