From 507a9a9f1c2e00980474cd1be855c68136d297f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ro=C3=9Fdeutscher?= Date: Tue, 16 Jun 2015 10:26:29 +0200 Subject: [PATCH 1/2] add removeDueDate to Card Model --- lib/Trello/Model/Card.php | 10 ++++++++++ lib/Trello/Model/CardInterface.php | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/lib/Trello/Model/Card.php b/lib/Trello/Model/Card.php index 9a07e20..82fb7b7 100644 --- a/lib/Trello/Model/Card.php +++ b/lib/Trello/Model/Card.php @@ -146,6 +146,16 @@ public function getDueDate() return new \DateTime($this->data['due']); } + /** + * {@inheritdoc} + */ + public function removeDueDate() + { + $this->data['due'] = null; + + return $this; + } + /** * {@inheritdoc} */ diff --git a/lib/Trello/Model/CardInterface.php b/lib/Trello/Model/CardInterface.php index 9a575e3..e946030 100644 --- a/lib/Trello/Model/CardInterface.php +++ b/lib/Trello/Model/CardInterface.php @@ -103,6 +103,13 @@ public function setDueDate(\DateTime $due); */ public function getDueDate(); + /** + * Remove the due date + * + * @return CardInterface + */ + public function removeDueDate(); + /** * Set email * From da290fc759919cb925f2fd538e4885a75544238d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ro=C3=9Fdeutscher?= Date: Tue, 16 Jun 2015 16:18:22 +0200 Subject: [PATCH 2/2] adding default value to setDueDate in card model, removing unneeded removeDueDate --- lib/Trello/Model/Card.php | 12 +----------- lib/Trello/Model/CardInterface.php | 9 +-------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/lib/Trello/Model/Card.php b/lib/Trello/Model/Card.php index 82fb7b7..bead76d 100644 --- a/lib/Trello/Model/Card.php +++ b/lib/Trello/Model/Card.php @@ -127,7 +127,7 @@ public function getPosition() /** * {@inheritdoc} */ - public function setDueDate(\DateTime $due) + public function setDueDate(\DateTime $due = null) { $this->data['due'] = $due; @@ -146,16 +146,6 @@ public function getDueDate() return new \DateTime($this->data['due']); } - /** - * {@inheritdoc} - */ - public function removeDueDate() - { - $this->data['due'] = null; - - return $this; - } - /** * {@inheritdoc} */ diff --git a/lib/Trello/Model/CardInterface.php b/lib/Trello/Model/CardInterface.php index e946030..1805fa4 100644 --- a/lib/Trello/Model/CardInterface.php +++ b/lib/Trello/Model/CardInterface.php @@ -94,7 +94,7 @@ public function getPosition(); * * @return CardInterface */ - public function setDueDate(\DateTime $due); + public function setDueDate(\DateTime $due = null); /** * Get due date @@ -103,13 +103,6 @@ public function setDueDate(\DateTime $due); */ public function getDueDate(); - /** - * Remove the due date - * - * @return CardInterface - */ - public function removeDueDate(); - /** * Set email *