diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-23 12:05:15 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-23 12:05:15 +0300 |
commit | 9e228bb3414d8ee1c0fdc8afc62db8371be9f090 (patch) | |
tree | d3122d98db3181ed26523ba3c55b0db71925ca06 /lib | |
parent | 9de3e67e77dd6ad2cffd4d29aae1223fdd7c826c (diff) |
Strict + typehinting
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Db/MailAccountMapper.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Db/MailAccountMapper.php b/lib/Db/MailAccountMapper.php index 4fbe7f486..409aa135d 100644 --- a/lib/Db/MailAccountMapper.php +++ b/lib/Db/MailAccountMapper.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @author Christoph Wurst <christoph@winzerhof-wurst.at> @@ -43,7 +44,7 @@ class MailAccountMapper extends QBMapper { * * @return MailAccount */ - public function find($userId, $accountId) { + public function find(string $userId, int $accountId): MailAccount { $qb = $this->db->getQueryBuilder(); $query = $qb ->select('*') @@ -58,11 +59,10 @@ class MailAccountMapper extends QBMapper { * Finds all Mail Accounts by user id existing for this user * * @param string $userId the id of the user that we want to find - * @param $userId * * @return MailAccount[] */ - public function findByUserId($userId) { + public function findByUserId(string $userId): array { $qb = $this->db->getQueryBuilder(); $query = $qb ->select('*') @@ -79,7 +79,7 @@ class MailAccountMapper extends QBMapper { * * @return MailAccount */ - public function save(MailAccount $account) { + public function save(MailAccount $account): MailAccount { if (is_null($account->getId())) { return $this->insert($account); } else { |