From ccf7433235bc2916e36461746a4fb58bc0b3897d Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Fri, 30 Nov 2018 09:57:49 -0100 Subject: [PATCH] cleaning Signed-off-by: Maxence Lange --- lib/Model/ActivityPub/Person.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/Model/ActivityPub/Person.php b/lib/Model/ActivityPub/Person.php index 03339d03..bfa25a16 100644 --- a/lib/Model/ActivityPub/Person.php +++ b/lib/Model/ActivityPub/Person.php @@ -386,6 +386,18 @@ class Person extends ACore implements JsonSerializable { return $this; } + /** + * @param string $detail + * @param bool $value + * + * @return Person + */ + public function addDetailBool(string $detail, bool $value): Person { + $this->details[$detail] = $value; + + return $this; + } + /** * @param array $details * @@ -424,12 +436,6 @@ class Person extends ACore implements JsonSerializable { $this->setIcon($icon); } - -// ->setCreation($this->getInt('creation', $data, 0)); - -// if ($this->getPreferredUsername() === '') { -// $this->setType('Invalid'); -// } } @@ -451,10 +457,6 @@ class Person extends ACore implements JsonSerializable { ->setFeatured($this->get('featured', $data, '')) ->setDetails($this->getArray('details', $data, [])) ->setCreation($this->getInt('creation', $data, 0)); - -// if ($this->getPreferredUsername() === '') { -// $this->setType('Invalid'); -// } }