From 4da5b2e5c48a3b89c2a7ea5e0e8876ca56bde54a Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Thu, 6 Feb 2020 13:51:19 +0100 Subject: [PATCH] Add type hints [MAILPOET-1798] --- lib/Entities/FormEntity.php | 2 +- lib/Form/FormsRepository.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Entities/FormEntity.php b/lib/Entities/FormEntity.php index 2f0cf3f68a..62d4ca9538 100644 --- a/lib/Entities/FormEntity.php +++ b/lib/Entities/FormEntity.php @@ -102,7 +102,7 @@ class FormEntity { $this->styles = $styles; } - public function toArray() { + public function toArray(): array { return [ 'id' => $this->getId(), 'name' => $this->getName(), diff --git a/lib/Form/FormsRepository.php b/lib/Form/FormsRepository.php index 2639e22476..7af0d9f47e 100644 --- a/lib/Form/FormsRepository.php +++ b/lib/Form/FormsRepository.php @@ -18,7 +18,10 @@ class FormsRepository extends Repository { return FormEntity::class; } - public function findAllNotDeleted() { + /** + * @return FormEntity[] + */ + public function findAllNotDeleted(): array { return $this->entityManager ->createQueryBuilder() ->select('f')