diff --git a/Build/phpstan/phpstan-baseline.neon b/Build/phpstan/phpstan-baseline.neon index 73b7d79db085..cabdc888c82d 100644 --- a/Build/phpstan/phpstan-baseline.neon +++ b/Build/phpstan/phpstan-baseline.neon @@ -3395,21 +3395,11 @@ parameters: count: 2 path: ../../typo3/sysext/extensionmanager/Tests/Unit/Utility/EmConfUtilityTest.php - - - message: "#^Method TYPO3\\\\CMS\\\\FrontendLogin\\\\Configuration\\\\RedirectConfiguration\\:\\:fromSettings\\(\\) should return static\\(TYPO3\\\\CMS\\\\FrontendLogin\\\\Configuration\\\\RedirectConfiguration\\) but returns TYPO3\\\\CMS\\\\FrontendLogin\\\\Configuration\\\\RedirectConfiguration\\.$#" - count: 1 - path: ../../typo3/sysext/felogin/Classes/Configuration/RedirectConfiguration.php - - message: "#^Method TYPO3\\\\CMS\\\\FrontendLogin\\\\Controller\\\\PasswordRecoveryController\\:\\:changePasswordAction\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface\\|string\\|null but return statement is missing\\.$#" count: 1 path: ../../typo3/sysext/felogin/Classes/Controller/PasswordRecoveryController.php - - - message: "#^PHPDoc tag @param references unknown parameter\\: \\$settings$#" - count: 1 - path: ../../typo3/sysext/felogin/Tests/Unit/Redirect/RedirectHandlerTest.php - - message: "#^Negated boolean expression is always false\\.$#" count: 1 diff --git a/typo3/sysext/felogin/Classes/Configuration/RecoveryConfiguration.php b/typo3/sysext/felogin/Classes/Configuration/RecoveryConfiguration.php index c71a3dbd0562..27aa0403980b 100644 --- a/typo3/sysext/felogin/Classes/Configuration/RecoveryConfiguration.php +++ b/typo3/sysext/felogin/Classes/Configuration/RecoveryConfiguration.php @@ -92,8 +92,6 @@ public function __construct( /** * Returns the forgot hash. - * - * @return string */ public function getForgotHash(): string { @@ -103,8 +101,6 @@ public function getForgotHash(): string /** * Returns an instance of TemplatePaths with paths configured in felogin TypoScript and * paths configured in $GLOBALS['TYPO3_CONF_VARS']['MAIL']. - * - * @return TemplatePaths */ public function getMailTemplatePaths(): TemplatePaths { @@ -126,8 +122,6 @@ public function getMailTemplatePaths(): TemplatePaths /** * Returns email template name configured in TypoScript - * - * @return string */ public function getMailTemplateName(): string { @@ -136,8 +130,6 @@ public function getMailTemplateName(): string /** * Returns TTL timestamp of the forgot hash - * - * @return int */ public function getLifeTimeTimestamp(): int { @@ -152,8 +144,6 @@ public function getLifeTimeTimestamp(): int /** * Returns reply-to address if configured otherwise null. - * - * @return Address|null */ public function getReplyTo(): ?Address { @@ -162,8 +152,6 @@ public function getReplyTo(): ?Address /** * Returns the sender. Normally the current typo3 installation. - * - * @return Address */ public function getSender(): Address { diff --git a/typo3/sysext/felogin/Classes/Configuration/RedirectConfiguration.php b/typo3/sysext/felogin/Classes/Configuration/RedirectConfiguration.php index 71f51c3c8100..b1ca71d041ae 100644 --- a/typo3/sysext/felogin/Classes/Configuration/RedirectConfiguration.php +++ b/typo3/sysext/felogin/Classes/Configuration/RedirectConfiguration.php @@ -98,9 +98,6 @@ public function getPageOnLogout(): int /** * Factory when creating a configuration out of Extbase / plugin settings. - * - * @param array $settings - * @return static */ public static function fromSettings(array $settings): self { diff --git a/typo3/sysext/felogin/Classes/Controller/AbstractLoginFormController.php b/typo3/sysext/felogin/Classes/Controller/AbstractLoginFormController.php index 240099743661..02311ddf1fc0 100644 --- a/typo3/sysext/felogin/Classes/Controller/AbstractLoginFormController.php +++ b/typo3/sysext/felogin/Classes/Controller/AbstractLoginFormController.php @@ -24,8 +24,6 @@ abstract class AbstractLoginFormController extends ActionController { /** * Returns the parsed storagePid list including recursions - * - * @return array */ protected function getStorageFolders(): array { diff --git a/typo3/sysext/felogin/Classes/Controller/LoginController.php b/typo3/sysext/felogin/Classes/Controller/LoginController.php index 46d67b0e4d99..0db5b35853df 100644 --- a/typo3/sysext/felogin/Classes/Controller/LoginController.php +++ b/typo3/sysext/felogin/Classes/Controller/LoginController.php @@ -170,9 +170,6 @@ public function loginAction(): ResponseInterface /** * User overview for logged in users - * - * @param bool $showLoginMessage - * @return ResponseInterface */ public function overviewAction(bool $showLoginMessage = false): ResponseInterface { @@ -196,8 +193,6 @@ public function overviewAction(bool $showLoginMessage = false): ResponseInterfac /** * Show logout form - * @param int $redirectPageLogout - * @return ResponseInterface */ public function logoutAction(int $redirectPageLogout = 0): ResponseInterface { @@ -246,8 +241,6 @@ protected function handleLoginForwards(): ?ResponseInterface /** * The permanent login checkbox should only be shown if permalogin is not deactivated (-1), * not forced to be always active (2) and lifetime is greater than 0 - * - * @return int */ protected function getPermaloginStatus(): int { @@ -265,8 +258,6 @@ protected function isPermaloginDisabled(int $permaLogin): bool /** * Redirect to overview on login successful and setting showLogoutFormAfterLogin disabled - * - * @return bool */ protected function shouldRedirectToOverview(): bool { @@ -277,8 +268,6 @@ protected function shouldRedirectToOverview(): bool /** * Return message key based on user login status - * - * @return string */ protected function getStatusMessageKey(): string { @@ -299,8 +288,6 @@ protected function isLoginOrLogoutInProgress(): bool /** * Is redirect disabled by setting or noredirect parameter - * - * @return bool */ public function isRedirectDisabled(): bool { diff --git a/typo3/sysext/felogin/Classes/Controller/PasswordRecoveryController.php b/typo3/sysext/felogin/Classes/Controller/PasswordRecoveryController.php index d796c1c15adf..f76c5f8b54c2 100644 --- a/typo3/sysext/felogin/Classes/Controller/PasswordRecoveryController.php +++ b/typo3/sysext/felogin/Classes/Controller/PasswordRecoveryController.php @@ -135,9 +135,6 @@ protected function validateIfHashHasExpired() /** * Show the change password form if a valid hash is available. - * - * @param string $hash - * @return ResponseInterface */ public function showChangePasswordAction(string $hash = ''): ResponseInterface { @@ -238,8 +235,6 @@ public function changePasswordAction(string $newPass, string $hash) } /** - * @param Result $originalResult - * * @throws NoSuchArgumentException */ protected function validateNewPassword(Result $originalResult): void @@ -267,10 +262,6 @@ protected function validateNewPassword(Result $originalResult): void /** * Wrapper to mock LocalizationUtility::translate - * - * @param string $key - * - * @return string */ protected function getTranslation(string $key): string { @@ -328,8 +319,7 @@ protected function notifyPasswordChange(string $newPassword, string $hashedPassw } /** - * @param string|null $email - * @return bool + * Returns whether the `exposeNonexistentUserInForgotPasswordDialog` setting is active or not */ protected function exposeNoneExistentUser(?string $email): bool { diff --git a/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserGroupRepository.php b/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserGroupRepository.php index 4647eaded4c9..e4084e2fa00b 100644 --- a/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserGroupRepository.php +++ b/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserGroupRepository.php @@ -48,10 +48,6 @@ public function getTable(): string return $this->table; } - /** - * @param int $groupId - * @return int|null - */ public function findRedirectPageIdByGroupId(int $groupId): ?int { $queryBuilder = $this->connection->createQueryBuilder(); diff --git a/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserRepository.php b/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserRepository.php index 0bbb8617c427..7c83623efa04 100644 --- a/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserRepository.php +++ b/typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserRepository.php @@ -60,8 +60,6 @@ public function getTable(): string /** * Change the password for a user based on forgot password hash. * - * @param string $forgotPasswordHash The hash of the feUser that should be resolved. - * @param string $hashedPassword The new password. * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException */ public function updatePasswordAndInvalidateHash(string $forgotPasswordHash, string $hashedPassword): void @@ -83,9 +81,6 @@ public function updatePasswordAndInvalidateHash(string $forgotPasswordHash, stri /** * Returns true if an user exists with hash as `felogin_forgothash`, otherwise false. - * - * @param string $hash The hash of the feUser that should be check for existence. - * @return bool Either true or false based on the existence of the user. */ public function existsUserWithHash(string $hash): bool { @@ -107,9 +102,6 @@ public function existsUserWithHash(string $hash): bool /** * Sets forgot hash for passed email address. - * - * @param string $emailAddress - * @param string $hash */ public function updateForgotHashForUserByEmail(string $emailAddress, string $hash): void { @@ -130,9 +122,6 @@ public function updateForgotHashForUserByEmail(string $emailAddress, string $has /** * Fetches array containing uid, username, email, first_name, middle_name & last_name by email * or empty array if user was not found. - * - * @param string $emailAddress - * @return array */ public function fetchUserInformationByEmail(string $emailAddress): array { @@ -155,11 +144,6 @@ public function fetchUserInformationByEmail(string $emailAddress): array return $result; } - /** - * @param string $usernameOrEmail - * @param array $pages - * @return string|null - */ public function findEmailByUsernameOrEmailOnPages(string $usernameOrEmail, array $pages = []): ?string { if ($usernameOrEmail === '') { @@ -187,10 +171,6 @@ public function findEmailByUsernameOrEmailOnPages(string $usernameOrEmail, array return $column === false || $column === '' ? null : (string)$column; } - /** - * @param string $hash - * @return array|null - */ public function findOneByForgotPasswordHash(string $hash): ?array { if ($hash === '') { @@ -214,10 +194,6 @@ public function findOneByForgotPasswordHash(string $hash): ?array return is_array($row) ? $row : null; } - /** - * @param int $uid - * @return int|null - */ public function findRedirectIdPageByUserId(int $uid): ?int { $queryBuilder = $this->connection->createQueryBuilder(); diff --git a/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php b/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php index b4a4679d5ed4..7d9ca4b70855 100644 --- a/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php +++ b/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php @@ -54,13 +54,7 @@ public function __construct( } /** - * Process redirect modes. The function searches for a redirect url using all configured modes. - * - * @param string $loginType - * @param RedirectConfiguration $configuration - * @param string $redirectModeReferrer - * @return string Redirect URL - * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException + * Process redirect modes. This method searches for a redirect url using all configured modes and returns it. */ public function processRedirect(string $loginType, RedirectConfiguration $configuration, string $redirectModeReferrer): string { @@ -88,10 +82,6 @@ public function processRedirect(string $loginType, RedirectConfiguration $config /** * Get alternative logout form redirect url if logout and page not accessible - * - * @param array $redirectModes - * @param int $redirectPageLogout - * @return string */ protected function getLogoutRedirectUrl(array $redirectModes, int $redirectPageLogout = 0): string { @@ -103,9 +93,6 @@ protected function getLogoutRedirectUrl(array $redirectModes, int $redirectPageL /** * Is used for alternative redirect urls on redirect mode "getpost" - * - * @param array $redirectModes - * @return string */ protected function getGetpostRedirectUrl(array $redirectModes): string { @@ -116,10 +103,6 @@ protected function getGetpostRedirectUrl(array $redirectModes): string /** * Handle redirect mode logout - * - * @param string $redirectMode - * @param int $redirectPageLogout - * @return string */ protected function handleSuccessfulLogout(string $redirectMode, int $redirectPageLogout): string { @@ -131,10 +114,6 @@ protected function handleSuccessfulLogout(string $redirectMode, int $redirectPag /** * Base on setting redirectFirstMethod get first or last entry from redirect url list. - * - * @param array $redirectUrlList - * @param string $redirectFirstMethod - * @return string */ protected function fetchReturnUrlFromList(array $redirectUrlList, $redirectFirstMethod): string { @@ -154,13 +133,6 @@ protected function fetchReturnUrlFromList(array $redirectUrlList, $redirectFirst /** * Generate redirect_url for case that the user was successfully logged in - * - * @param string $redirectMode - * @param int $redirectPageLogin - * @param string $domains - * @param string $redirectModeReferrer - * @return string - * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException */ protected function handleSuccessfulLogin(string $redirectMode, int $redirectPageLogin = 0, string $domains = '', string $redirectModeReferrer = ''): string { @@ -202,13 +174,6 @@ protected function isUserLoginFailedAndLoginErrorActive(array $redirectModes, st && $this->isRedirectModeActive($redirectModes, RedirectMode::LOGIN_ERROR); } - /** - * Checks if the give mode is active or not - * - * @param string $mode - * @param array $redirectModes - * @return bool - */ protected function isRedirectModeActive(array $redirectModes, string $mode): bool { return in_array($mode, $redirectModes, true); @@ -216,10 +181,6 @@ protected function isRedirectModeActive(array $redirectModes, string $mode): boo /** * Returns the redirect Url that should be used in login form template for GET/POST redirect mode - * - * @param RedirectConfiguration $configuration - * @param bool $redirectDisabled - * @return string */ public function getLoginFormRedirectUrl(RedirectConfiguration $configuration, bool $redirectDisabled): string { @@ -231,11 +192,6 @@ public function getLoginFormRedirectUrl(RedirectConfiguration $configuration, bo /** * Returns the redirect Url that should be used in logout form - * - * @param RedirectConfiguration $configuration - * @param int $redirectPageLogout - * @param bool $redirectDisabled - * @return string */ public function getLogoutFormRedirectUrl(RedirectConfiguration $configuration, int $redirectPageLogout, bool $redirectDisabled): string { diff --git a/typo3/sysext/felogin/Classes/Redirect/RedirectModeHandler.php b/typo3/sysext/felogin/Classes/Redirect/RedirectModeHandler.php index 4ae81528f246..bda8381803c8 100644 --- a/typo3/sysext/felogin/Classes/Redirect/RedirectModeHandler.php +++ b/typo3/sysext/felogin/Classes/Redirect/RedirectModeHandler.php @@ -82,8 +82,6 @@ public function __construct( /** * Handle redirect mode groupLogin - * - * @return string */ public function redirectModeGroupLogin(): string { @@ -108,8 +106,6 @@ public function redirectModeGroupLogin(): string /** * Handle redirect mode userLogin - * - * @return string */ public function redirectModeUserLogin(): string { @@ -126,9 +122,6 @@ public function redirectModeUserLogin(): string /** * Handle redirect mode login - * - * @param int $redirectPageLogin - * @return string */ public function redirectModeLogin(int $redirectPageLogin): string { @@ -142,9 +135,6 @@ public function redirectModeLogin(int $redirectPageLogin): string /** * Handle redirect mode referrer - * - * @param string $redirectReferrer - * @return string */ public function redirectModeReferrer(string $redirectReferrer): string { @@ -159,10 +149,6 @@ public function redirectModeReferrer(string $redirectReferrer): string /** * Handle redirect mode refererDomains - * - * @param string $domains - * @param string $redirectReferrer - * @return string */ public function redirectModeRefererDomains(string $domains, string $redirectReferrer): string { @@ -204,9 +190,6 @@ public function redirectModeRefererDomains(string $domains, string $redirectRefe /** * Handle redirect mode loginError after login-error - * - * @param int $redirectPageLoginError - * @return string */ public function redirectModeLoginError(int $redirectPageLoginError = 0): string { @@ -220,9 +203,6 @@ public function redirectModeLoginError(int $redirectPageLoginError = 0): string /** * Handle redirect mode logout - * - * @param int $redirectPageLogout - * @return string */ public function redirectModeLogout(int $redirectPageLogout): string { diff --git a/typo3/sysext/felogin/Classes/Redirect/ServerRequestHandler.php b/typo3/sysext/felogin/Classes/Redirect/ServerRequestHandler.php index 1264c774aaf3..69333faf7f60 100644 --- a/typo3/sysext/felogin/Classes/Redirect/ServerRequestHandler.php +++ b/typo3/sysext/felogin/Classes/Redirect/ServerRequestHandler.php @@ -61,8 +61,6 @@ public function getPropertyFromGetAndPost(string $propertyName) /** * Returns validated redirect url contained in request param return_url or redirect_url - * - * @return string */ public function getRedirectUrlRequestParam(): string { diff --git a/typo3/sysext/felogin/Classes/Service/RecoveryService.php b/typo3/sysext/felogin/Classes/Service/RecoveryService.php index e26877fd7409..a460d3d89905 100644 --- a/typo3/sysext/felogin/Classes/Service/RecoveryService.php +++ b/typo3/sysext/felogin/Classes/Service/RecoveryService.php @@ -29,7 +29,6 @@ use TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException; use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder; use TYPO3\CMS\Extbase\Utility\LocalizationUtility; -use TYPO3\CMS\FrontendLogin\Configuration\IncompleteConfigurationException; use TYPO3\CMS\FrontendLogin\Configuration\RecoveryConfiguration; use TYPO3\CMS\FrontendLogin\Domain\Repository\FrontendUserRepository; use TYPO3\CMS\FrontendLogin\Event\SendRecoveryEmailEvent; @@ -99,10 +98,7 @@ public function __construct( * Sends an email with an absolute link including a forgot hash to the passed email address * with instructions to recover the account. * - * @param string $emailAddress Receiver's email address. - * * @throws TransportExceptionInterface - * @throws IncompleteConfigurationException */ public function sendRecoveryEmail(string $emailAddress): void { @@ -122,10 +118,6 @@ public function sendRecoveryEmail(string $emailAddress): void /** * Get display name from values. Fallback to username if none of the "_name" fields is set. - * - * @param array $userInformation - * - * @return string */ protected function getReceiverName(array $userInformation): string { @@ -143,12 +135,6 @@ protected function getReceiverName(array $userInformation): string /** * Create email object from configuration. - * - * @param Address $receiver - * @param string $hash - * - * @return Email - * @throws IncompleteConfigurationException */ protected function prepareMail(Address $receiver, string $hash): Email { diff --git a/typo3/sysext/felogin/Classes/Service/RecoveryServiceInterface.php b/typo3/sysext/felogin/Classes/Service/RecoveryServiceInterface.php index ce3c366c04ec..b15855d0aa0f 100644 --- a/typo3/sysext/felogin/Classes/Service/RecoveryServiceInterface.php +++ b/typo3/sysext/felogin/Classes/Service/RecoveryServiceInterface.php @@ -17,17 +17,11 @@ namespace TYPO3\CMS\FrontendLogin\Service; -use TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException; - interface RecoveryServiceInterface { /** * Sends an email with an absolute link including a forgot hash to the passed email address * with instructions to recover the account. - * - * @param string $emailAddress Receiver's email address. - * - * @throws InvalidConfigurationTypeException */ public function sendRecoveryEmail(string $emailAddress): void; } diff --git a/typo3/sysext/felogin/Classes/Service/UserService.php b/typo3/sysext/felogin/Classes/Service/UserService.php index bb8924ce8fb4..ea22df64380f 100644 --- a/typo3/sysext/felogin/Classes/Service/UserService.php +++ b/typo3/sysext/felogin/Classes/Service/UserService.php @@ -36,8 +36,6 @@ public function __construct() /** * Get user- and sessiondata from Frontend User - * - * @return array */ public function getFeUserData(): array { @@ -46,8 +44,6 @@ public function getFeUserData(): array /** * Should return true if a cookie warning is needed to be displayed - * - * @return bool */ public function cookieWarningRequired(): bool { diff --git a/typo3/sysext/felogin/Classes/Validation/RedirectUrlValidator.php b/typo3/sysext/felogin/Classes/Validation/RedirectUrlValidator.php index 4b98ceaf5044..83e04cef3584 100644 --- a/typo3/sysext/felogin/Classes/Validation/RedirectUrlValidator.php +++ b/typo3/sysext/felogin/Classes/Validation/RedirectUrlValidator.php @@ -37,9 +37,6 @@ class RedirectUrlValidator implements LoggerAwareInterface */ protected $siteFinder; - /** - * @param SiteFinder|null $siteFinder - */ public function __construct(?SiteFinder $siteFinder) { $this->siteFinder = $siteFinder ?? GeneralUtility::makeInstance(SiteFinder::class); @@ -47,9 +44,6 @@ public function __construct(?SiteFinder $siteFinder) /** * Checks if a given URL is valid / properly sanitized and/or the domain is known to TYPO3. - * - * @param string $value - * @return bool */ public function isValid(string $value): bool { @@ -68,9 +62,6 @@ public function isValid(string $value): bool /** * Determines whether the URL is on the current host and belongs to the * current TYPO3 installation. The scheme part is ignored in the comparison. - * - * @param string $url URL to be checked - * @return bool Whether the URL belongs to the current TYPO3 installation */ protected function isInCurrentDomain(string $url): bool { @@ -86,9 +77,6 @@ protected function isInCurrentDomain(string $url): bool /** * Determines whether the URL matches a domain known to TYPO3. - * - * @param string $url Absolute URL which needs to be checked - * @return bool Whether the URL is considered to be local */ protected function isInLocalDomain(string $url): bool { @@ -109,9 +97,6 @@ protected function isInLocalDomain(string $url): bool /** * Determines whether the URL is relative to the current TYPO3 installation. - * - * @param string $url URL which needs to be checked - * @return bool Whether the URL is considered to be relative */ protected function isRelativeUrl(string $url): bool { diff --git a/typo3/sysext/felogin/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php b/typo3/sysext/felogin/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php index 0353a867a5c7..fb0186bd013e 100644 --- a/typo3/sysext/felogin/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php +++ b/typo3/sysext/felogin/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php @@ -83,8 +83,6 @@ public function existsUserWithHash(): void /** * @test * @dataProvider fetchUserInformationByEmailDataProvider - * @param string $emailAddress - * @param array $expected */ public function fetchUserInformationByEmail(string $emailAddress, array $expected): void { diff --git a/typo3/sysext/felogin/Tests/Unit/Configuration/RecoveryConfigurationTest.php b/typo3/sysext/felogin/Tests/Unit/Configuration/RecoveryConfigurationTest.php index 07dc10b80fc5..9169232267ec 100644 --- a/typo3/sysext/felogin/Tests/Unit/Configuration/RecoveryConfigurationTest.php +++ b/typo3/sysext/felogin/Tests/Unit/Configuration/RecoveryConfigurationTest.php @@ -83,7 +83,6 @@ protected function setUp(): void /** * @throws InvalidConfigurationTypeException - * @throws IncompleteConfigurationException */ protected function setupSubject(): void { diff --git a/typo3/sysext/felogin/Tests/Unit/Redirect/RedirectHandlerTest.php b/typo3/sysext/felogin/Tests/Unit/Redirect/RedirectHandlerTest.php index 10560d3bbea0..825377b7753c 100644 --- a/typo3/sysext/felogin/Tests/Unit/Redirect/RedirectHandlerTest.php +++ b/typo3/sysext/felogin/Tests/Unit/Redirect/RedirectHandlerTest.php @@ -80,8 +80,6 @@ protected function setUp(): void /** * @test * @dataProvider loginTypeLogoutDataProvider - * @param string $expect - * @param array $settings */ public function processShouldReturnStringForLoginTypeLogout(string $expect, string $redirectMode): void { @@ -99,10 +97,6 @@ public function loginTypeLogoutDataProvider(): Generator /** * @test * @dataProvider getLogoutRedirectUrlDataProvider - * @param string $expected - * @param array $redirectModes - * @param array $body - * @param bool $userLoggedIn */ public function getLogoutRedirectUrlShouldReturnAlternativeRedirectUrl( string $expected, @@ -140,8 +134,8 @@ public function getLogoutRedirectUrlDataProvider(): Generator /** * @test */ - public function getLogoutRedirectUrlShouldReturnAlternativeRedirectUrlForLoggedInUserAndRedirectPageLogoutSet( - ): void { + public function getLogoutRedirectUrlShouldReturnAlternativeRedirectUrlForLoggedInUserAndRedirectPageLogoutSet(): void + { $this->setUserLoggedIn(true); $this->subject = new RedirectHandler( diff --git a/typo3/sysext/felogin/Tests/Unit/Service/RecoveryServiceTest.php b/typo3/sysext/felogin/Tests/Unit/Service/RecoveryServiceTest.php index 41a36fe087fb..b10db25a7f01 100644 --- a/typo3/sysext/felogin/Tests/Unit/Service/RecoveryServiceTest.php +++ b/typo3/sysext/felogin/Tests/Unit/Service/RecoveryServiceTest.php @@ -62,12 +62,6 @@ protected function setUp(): void * @test * @dataProvider configurationDataProvider * - * @param string $emailAddress - * @param array $recoveryConfiguration - * @param array $userInformation - * @param Address $receiver - * @param array $settings - * * @throws \Symfony\Component\Mailer\Exception\TransportExceptionInterface * @throws \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException */ @@ -225,11 +219,6 @@ public function configurationDataProvider(): Generator ]; } - /** - * @param string $emailAddress - * @param array $recoveryConfiguration - * @param array $userInformation - */ protected function mockRecoveryConfigurationAndUserRepository( string $emailAddress, array $recoveryConfiguration, diff --git a/typo3/sysext/felogin/Tests/Unit/Service/ValidatorResolverServiceTest.php b/typo3/sysext/felogin/Tests/Unit/Service/ValidatorResolverServiceTest.php index e3026d56b47d..4c59ea372268 100644 --- a/typo3/sysext/felogin/Tests/Unit/Service/ValidatorResolverServiceTest.php +++ b/typo3/sysext/felogin/Tests/Unit/Service/ValidatorResolverServiceTest.php @@ -45,7 +45,6 @@ public function resolveShouldReturnEmptyArrayIfEmptyConfigurationIsPassed(): voi /** * @test * @dataProvider validatorConfigDataProvider - * @param array $config */ public function resolveShouldReturnValidators(array $config): void { diff --git a/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php b/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php index 71eb06d49d4d..381737e85d6f 100644 --- a/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php +++ b/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php @@ -90,8 +90,6 @@ protected function setUpFakeSitePathAndHost(): void /** * Data provider for validateRedirectUrlClearsUrl - * - * @return array */ public function validateRedirectUrlClearsUrlDataProvider(): array { @@ -116,9 +114,8 @@ public function validateRedirectUrlClearsUrlDataProvider(): array /** * @test * @dataProvider validateRedirectUrlClearsUrlDataProvider - * @param string $url Invalid Url */ - public function validateRedirectUrlClearsUrl($url): void + public function validateRedirectUrlClearsUrl(string $url): void { Environment::initialize( Environment::getContext(), @@ -136,8 +133,6 @@ public function validateRedirectUrlClearsUrl($url): void /** * Data provider for validateRedirectUrlKeepsCleanUrl - * - * @return array */ public function validateRedirectUrlKeepsCleanUrlDataProvider(): array { @@ -157,9 +152,8 @@ public function validateRedirectUrlKeepsCleanUrlDataProvider(): array /** * @test * @dataProvider validateRedirectUrlKeepsCleanUrlDataProvider - * @param string $url Clean URL to test */ - public function validateRedirectUrlKeepsCleanUrl($url): void + public function validateRedirectUrlKeepsCleanUrl(string $url): void { Environment::initialize( Environment::getContext(), @@ -177,8 +171,6 @@ public function validateRedirectUrlKeepsCleanUrl($url): void /** * Data provider for validateRedirectUrlClearsInvalidUrlInSubdirectory - * - * @return array */ public function validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider(): array { @@ -195,9 +187,8 @@ public function validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider(): /** * @test * @dataProvider validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider - * @param string $url Invalid Url */ - public function validateRedirectUrlClearsInvalidUrlInSubdirectory($url): void + public function validateRedirectUrlClearsInvalidUrlInSubdirectory(string $url): void { $this->testSitePath = '/subdir/'; $this->setUpFakeSitePathAndHost(); @@ -206,8 +197,6 @@ public function validateRedirectUrlClearsInvalidUrlInSubdirectory($url): void /** * Data provider for validateRedirectUrlKeepsCleanUrlInSubdirectory - * - * @return array */ public function validateRedirectUrlKeepsCleanUrlInSubdirectoryDataProvider(): array { @@ -225,9 +214,8 @@ public function validateRedirectUrlKeepsCleanUrlInSubdirectoryDataProvider(): ar /** * @test * @dataProvider validateRedirectUrlKeepsCleanUrlInSubdirectoryDataProvider - * @param string $url Invalid Url */ - public function validateRedirectUrlKeepsCleanUrlInSubdirectory($url): void + public function validateRedirectUrlKeepsCleanUrlInSubdirectory(string $url): void { Environment::initialize( Environment::getContext(), @@ -251,8 +239,6 @@ public function validateRedirectUrlKeepsCleanUrlInSubdirectory($url): void /** * Dataprovider for isInCurrentDomainIgnoresScheme - * - * @return array */ public function isInCurrentDomainIgnoresSchemeDataProvider(): array { @@ -287,7 +273,7 @@ public function isInCurrentDomainIgnoresSchemeDataProvider(): array * @param string $https $_SERVER['HTTPS'] * @param string $url The url to test */ - public function isInCurrentDomainIgnoresScheme($host, $https, $url): void + public function isInCurrentDomainIgnoresScheme(string $host, string $https, string $url): void { Environment::initialize( Environment::getContext(), @@ -312,9 +298,6 @@ public function isInCurrentDomainIgnoresScheme($host, $https, $url): void self::assertTrue($this->accessibleFixture->_call('isInCurrentDomain', $url)); } - /** - * @return array - */ public function isInCurrentDomainReturnsFalseIfDomainsAreDifferentDataProvider(): array { return [ @@ -335,7 +318,7 @@ public function isInCurrentDomainReturnsFalseIfDomainsAreDifferentDataProvider() * @param string $host $_SERVER['HTTP_HOST'] * @param string $url The url to test */ - public function isInCurrentDomainReturnsFalseIfDomainsAreDifferent($host, $url): void + public function isInCurrentDomainReturnsFalseIfDomainsAreDifferent(string $host, string $url): void { $_SERVER['HTTP_HOST'] = $host; self::assertFalse($this->accessibleFixture->_call('isInCurrentDomain', $url));