From d9d3c6d68e08e718118ba1bbaa01466fb18d8a56 Mon Sep 17 00:00:00 2001
From: Joas Schilling <coding@schilljs.com>
Date: Tue, 18 Oct 2016 09:10:51 +0200
Subject: [PATCH] Fix more code errors

Signed-off-by: Joas Schilling <coding@schilljs.com>
---
 lib/Service/AutoConfig/ImapConnector.php      |  4 ++--
 lib/Service/AutoConfig/ImapServerDetector.php |  2 ++
 lib/Service/IMailBox.php                      |  4 ++--
 lib/Service/UnifiedMailbox.php                | 14 ++++++++++----
 4 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/lib/Service/AutoConfig/ImapConnector.php b/lib/Service/AutoConfig/ImapConnector.php
index c587a3333..31ddb3baa 100644
--- a/lib/Service/AutoConfig/ImapConnector.php
+++ b/lib/Service/AutoConfig/ImapConnector.php
@@ -28,7 +28,7 @@ use OCA\Mail\Service\Logger;
 class ImapConnector {
 
 	/**
-	 * @var Crypto
+	 * @var ICrypto
 	 */
 	private $crypto;
 
@@ -45,7 +45,7 @@ class ImapConnector {
 	/**
 	 * @param ICrypto $crypto
 	 * @param Logger $logger
-	 * @param type $UserId
+	 * @param string $UserId
 	 */
 	public function __construct(ICrypto $crypto, Logger $logger, $UserId) {
 		$this->crypto = $crypto;
diff --git a/lib/Service/AutoConfig/ImapServerDetector.php b/lib/Service/AutoConfig/ImapServerDetector.php
index 63158bfc6..5628493fb 100644
--- a/lib/Service/AutoConfig/ImapServerDetector.php
+++ b/lib/Service/AutoConfig/ImapServerDetector.php
@@ -20,6 +20,8 @@
  */
 namespace OCA\Mail\Service\AutoConfig;
 
+use OCA\Mail\Db\MailAccount;
+
 class ImapServerDetector {
 
 	/** @var MxRecord */
diff --git a/lib/Service/IMailBox.php b/lib/Service/IMailBox.php
index 76b9fb96c..638a0a7a9 100644
--- a/lib/Service/IMailBox.php
+++ b/lib/Service/IMailBox.php
@@ -23,7 +23,7 @@ namespace OCA\Mail\Service;
 
 use Horde_Imap_Client_Search_Query;
 use OCA\Mail\Attachment;
-use OCA\Mail\Message;
+use OCA\Mail\Model\IMessage;
 
 interface IMailBox {
 
@@ -47,7 +47,7 @@ interface IMailBox {
 
 	/**
 	 * @param int $id
-	 * @return Message
+	 * @return IMessage
 	 */
 	public function getMessage($id);
 
diff --git a/lib/Service/UnifiedMailbox.php b/lib/Service/UnifiedMailbox.php
index 34c68f204..0016378d7 100644
--- a/lib/Service/UnifiedMailbox.php
+++ b/lib/Service/UnifiedMailbox.php
@@ -22,11 +22,17 @@
 namespace OCA\Mail\Service;
 
 use OCA\Mail\Attachment;
-use OCA\Mail\Message;
+use OCA\Mail\Model\IMessage;
 
 class UnifiedMailbox implements IMailBox {
 
+	/** @var AccountService */
+	protected $accountService;
+	/** @var string */
+	protected $userId;
+
 	/**
+	 * @param AccountService $accountService
 	 * @param string $userId
 	 */
 	public function __construct(AccountService $accountService, $userId) {
@@ -38,7 +44,7 @@ class UnifiedMailbox implements IMailBox {
 	 * @return string
 	 */
 	public function getFolderId() {
-		// TODO: Implement getFolderId() method.
+		return null;
 	}
 
 	/**
@@ -100,13 +106,13 @@ class UnifiedMailbox implements IMailBox {
 
 	/**
 	 * @param string $messageId
-	 * @return Message
+	 * @return IMessage
 	 */
 	public function getMessage($messageId, $loadHtmlMessageBody = false) {
 		/** @var IMailBox $inbox */
 		/** @var IAccount $account */
 		list($inbox, $messageId, $account) = $this->resolve($messageId);
-		/** @var Message $message */
+		/** @var IMessage $message */
 		$message = $inbox->getMessage($messageId, $loadHtmlMessageBody);
 		$message->setUid(base64_encode(json_encode([$account->getId(), $message->getUid()])));
 
-- 
GitLab