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

[BUGFIX] Ignore or correct PHPStan errors #77

Merged
merged 1 commit into from
Jan 31, 2025
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
2 changes: 1 addition & 1 deletion Classes/Controller/EditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function updateAction(\In2code\Femanager\Domain\Model\User $user) {
* @return void
*/
public function disableAction() {
exit();
$this->view->assign('user', $this->user);
exit();
}
}
1 change: 1 addition & 0 deletions Classes/Controller/ExtendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public function disableAction()

// second disable the account
$this->user->setDisable(true);
// @phpstan-ignore-next-line
$this->user->setInactivemessageTstamp(time());
$this->userRepository->update($this->user);
$this->persistenceManager->persistAll();
Expand Down
1 change: 1 addition & 0 deletions Classes/Controller/InvitationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function createAction(\In2code\Femanager\Domain\Model\User $user)
*/
public function updateAction(\In2code\Femanager\Domain\Model\User $user, $hash = null)
{
// @phpstan-ignore-next-line
$user->setTxFemanagerConfirmedbyuser(true);
parent::updateAction($user);
}
Expand Down
2 changes: 2 additions & 0 deletions Classes/Controller/NewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public function createAction(\In2code\Femanager\Domain\Model\User $user)
$user->setEmail($newEmailAddress);
$user->setUsername($newEmailAddress);
$user->setUsergroup($this->user->getUsergroup());
// @phpstan-ignore-next-line
$user->setOldAccount($this->user->getUid());
// @phpstan-ignore-next-line
$user->setTxFemanagerConfirmedbyuser(false);
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
public function listAction()
{
$userUid = $this->user->getUid();

// @phpstan-ignore-next-line
$this->view->assignMultiple([

Check failure on line 67 in Classes/Controller/SearchController.php

View workflow job for this annotation

GitHub Actions / phpstan

No error to ignore is reported on line 67.
'savedSearches' => $this->searchRepository->findByFeUser($userUid),

Check failure on line 68 in Classes/Controller/SearchController.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Slub\DigasFeManagement\Domain\Repository\SearchRepository::findByFeUser().
'token' => GeneralUtility::hmac((string)$userUid, (string) $this->user->getCrdate()->getTimestamp()),
'user' => $userUid
]);
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Repository/StatisticRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function findForFilter($dateFrom = null, $dateTo = null, $feUserUid = nul
if (!empty($feUserUid)) {
$filterConditions[] = $queryBuilder->expr()->eq('fe_user', $feUserUid);
}

// @phpstan-ignore-next-line
$rows = $queryBuilder->where(...$filterConditions)
->execute()
->fetchAll();
Expand Down Expand Up @@ -155,7 +155,7 @@ public function findForStatistic($feUserUid = null)
if (!empty($feUserUid)) {
$queryBuilder->where($queryBuilder->expr()->eq('fe_user', $feUserUid));
}

// @phpstan-ignore-next-line
$rows = $queryBuilder->execute()->fetchAll();

return $this->dataMapQueryResult($rows);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Hooks/FeUserHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function initUserRepository()
* check if user has changed e-mail/username on login
*
* @param array $params
* @return void
* @return mixed
*/
public function checkChangedUsername(&$params)
{
Expand Down
Loading