diff --git a/lib/SP/DataModel/ActionData.php b/lib/SP/DataModel/ActionData.php index 1b74ea23..11143be4 100644 --- a/lib/SP/DataModel/ActionData.php +++ b/lib/SP/DataModel/ActionData.php @@ -50,18 +50,12 @@ class ActionData implements DataModelInterface */ public $route; - /** - * @return int - */ - public function getId() + public function getId(): ?int { return $this->id; } - /** - * @return string - */ - public function getName() + public function getName(): ?string { return $this->name; } diff --git a/lib/SP/DataModel/CustomFieldDefDataOld.php b/lib/SP/DataModel/CustomFieldDefDataOld.php index 3a90833f..c5b57929 100644 --- a/lib/SP/DataModel/CustomFieldDefDataOld.php +++ b/lib/SP/DataModel/CustomFieldDefDataOld.php @@ -154,18 +154,12 @@ class CustomFieldDefDataOld extends CustomFieldBaseData implements DataModelInte return $this->help; } - /** - * @param string $help - */ public function setHelp($help) { $this->help = $help; } - /** - * @return int - */ - public function getId() + public function getId(): ?int { return $this->customfielddef_id; } diff --git a/lib/SP/DataModel/CustomFieldTypeData.php b/lib/SP/DataModel/CustomFieldTypeData.php index f6d10fd6..0be7cbc6 100644 --- a/lib/SP/DataModel/CustomFieldTypeData.php +++ b/lib/SP/DataModel/CustomFieldTypeData.php @@ -48,10 +48,7 @@ class CustomFieldTypeData extends DataModelBase implements DataModelInterface */ public $text; - /** - * @return int - */ - public function getId() + public function getId(): ?int { return (int)$this->id; } @@ -67,7 +64,7 @@ class CustomFieldTypeData extends DataModelBase implements DataModelInterface /** * @return string */ - public function getName() + public function getName(): ?string { return $this->name; } diff --git a/lib/SP/DataModel/FileData.php b/lib/SP/DataModel/FileData.php index c12705df..6658a1a9 100644 --- a/lib/SP/DataModel/FileData.php +++ b/lib/SP/DataModel/FileData.php @@ -69,10 +69,7 @@ class FileData extends DataModelBase implements DataModelInterface */ public $size; - /** - * @return int - */ - public function getId() + public function getId(): ?int { return (int)$this->id; } @@ -101,10 +98,7 @@ class FileData extends DataModelBase implements DataModelInterface $this->accountId = $accountId; } - /** - * @return string - */ - public function getName() + public function getName(): ?string { return $this->name; } diff --git a/lib/SP/DataModel/ItemData.php b/lib/SP/DataModel/ItemData.php index 44cd7f28..7b8855e1 100644 --- a/lib/SP/DataModel/ItemData.php +++ b/lib/SP/DataModel/ItemData.php @@ -42,18 +42,12 @@ class ItemData implements DataModelInterface */ public $name; - /** - * @return int - */ - public function getId() + public function getId(): ?int { return (int)$this->id; } - /** - * @return string - */ - public function getName() + public function getName(): ?string { return $this->name; } diff --git a/lib/SP/DataModel/PublicLinkData.php b/lib/SP/DataModel/PublicLinkData.php index 6bd92a25..f9641107 100644 --- a/lib/SP/DataModel/PublicLinkData.php +++ b/lib/SP/DataModel/PublicLinkData.php @@ -109,10 +109,7 @@ class PublicLinkData extends DataModelBase implements DataModelInterface $this->data = $data; } - /** - * @return int - */ - public function getId() + public function getId(): ?int { return (int)$this->id; } @@ -309,10 +306,7 @@ class PublicLinkData extends DataModelBase implements DataModelInterface return $this->totalCountViews++; } - /** - * @return string - */ - public function getName() + public function getName(): ?string { return ''; } diff --git a/lib/SP/Domain/Account/Services/AccountService.php b/lib/SP/Domain/Account/Services/AccountService.php index 3f9f8b1f..91da40dc 100644 --- a/lib/SP/Domain/Account/Services/AccountService.php +++ b/lib/SP/Domain/Account/Services/AccountService.php @@ -592,7 +592,7 @@ final class AccountService extends Service implements AccountServiceInterface $accountHistoryData = $this->accountHistoryService->getById($historyId); $this->accountRepository->transactionAware( - function () use ($historyId, $accountId) { + function () use ($historyId, $accountId, $accountHistoryData) { $this->addHistory($accountId); if (!$this->accountRepository->editRestore($accountHistoryData, $this->context->getUserData()->getId())) {