Skip to content

Commit

Permalink
Merge pull request #77 from beatrycze-volk/ignore-phpstan
Browse files Browse the repository at this point in the history
[BUGFIX] Ignore or correct PHPStan errors
  • Loading branch information
beatrycze-volk authored Jan 31, 2025
2 parents 89a7e9a + 190f8a9 commit 758315d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
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,7 +63,7 @@ public function injectSearchRepository(SearchRepository $searchRepository): void
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()),
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

0 comments on commit 758315d

Please sign in to comment.