Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-10-16 13:24:15 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-10-16 13:24:15 +0300
commitcd8a29fa98378903f131a51f7cbc5bf68ba4025c (patch)
tree1c2bfebe84a12bfb1223d9fb2d635c49437454e4 /lib/Address.php
parent55dbca0bee7767c1abdc691e4a60653d8265a289 (diff)
Pimp Address.php
* Removed weird unused namespace * Added typehints * Made strict Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/Address.php')
-rw-r--r--lib/Address.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Address.php b/lib/Address.php
index d870cbf67..4eff928b3 100644
--- a/lib/Address.php
+++ b/lib/Address.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -26,7 +27,6 @@ namespace OCA\Mail;
use Horde_Mail_Rfc822_Address;
use JsonSerializable;
-use SGH\Comparable\Comparable;
class Address implements JsonSerializable {
@@ -48,7 +48,7 @@ class Address implements JsonSerializable {
/**
* @return string
*/
- public function getLabel() {
+ public function getLabel(): string {
$personal = $this->wrapped->personal;
if (is_null($personal)) {
// Fallback
@@ -60,21 +60,21 @@ class Address implements JsonSerializable {
/**
* @return string
*/
- public function getEmail() {
+ public function getEmail(): string {
return $this->wrapped->bare_address;
}
/**
* @return Horde_Mail_Rfc822_Address
*/
- public function toHorde() {
+ public function toHorde(): Horde_Mail_Rfc822_Address {
return $this->wrapped;
}
/**
* @return array
*/
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'label' => $this->getLabel(),
'email' => $this->getEmail(),
@@ -85,7 +85,7 @@ class Address implements JsonSerializable {
* @param Address $object
* @return boolean
*/
- public function equals($object) {
+ public function equals($object): bool {
return $this->getEmail() === $object->getEmail()
&& $this->getLabel() === $object->getLabel();
}