@@ -223,6 +223,7 @@ public function setSchemasPath($path)
223223 * Process the SAML Response sent by the IdP.
224224 *
225225 * @param string|null $requestId The ID of the AuthNRequest sent by this SP to the IdP
226+ * @phpstan-return ($stay is true ? string : never)
226227 *
227228 * @throws Error
228229 * @throws ValidationError
@@ -273,6 +274,7 @@ public function processResponse($requestId = null)
273274 * @param bool $stay True if we want to stay (returns the url string) False to redirect
274275 *
275276 * @return string|null
277+ * @phpstan-return ($stay is true ? string : never)
276278 *
277279 * @throws Error
278280 */
@@ -355,6 +357,7 @@ public function processSLO($keepLocalSession = false, $requestId = null, $retrie
355357 * @param bool $stay True if we want to stay (returns the url string) False to redirect
356358 *
357359 * @return string|null
360+ * @phpstan-return ($stay is true ? string : never)
358361 */
359362 public function redirectTo ($ url = '' , array $ parameters = array (), $ stay = false )
360363 {
@@ -536,6 +539,7 @@ public function getAttributeWithFriendlyName($friendlyName)
536539 * @param string $nameIdValueReq Indicates to the IdP the subject that should be authenticated
537540 *
538541 * @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
542+ * @phpstan-return ($stay is true ? string : never)
539543 *
540544 * @throws Error
541545 */
@@ -576,6 +580,7 @@ public function login($returnTo = null, array $parameters = array(), $forceAuthn
576580 * @param string|null $nameIdNameQualifier The NameID NameQualifier will be set in the LogoutRequest.
577581 *
578582 * @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
583+ * @phpstan-return ($stay is true ? string : never)
579584 *
580585 * @throws Error
581586 */
0 commit comments