From 85132b8189b2afe43fc832418d11e436be84aee1 Mon Sep 17 00:00:00 2001 From: DavidBadura Date: Sun, 8 Feb 2015 15:40:37 +0000 Subject: [PATCH] small changes --- src/Recurring.php | 8 ++++++++ src/Serializer/Handler/RecurringHandler.php | 2 +- src/TaskManager.php | 3 +-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Recurring.php b/src/Recurring.php index e0ffb23..d7dd8c5 100644 --- a/src/Recurring.php +++ b/src/Recurring.php @@ -39,6 +39,14 @@ class Recurring } } + /** + * @return string + */ + public function getValue() + { + return $this->recurring; + } + /** * @return string */ diff --git a/src/Serializer/Handler/RecurringHandler.php b/src/Serializer/Handler/RecurringHandler.php index 82e7f91..912e32b 100644 --- a/src/Serializer/Handler/RecurringHandler.php +++ b/src/Serializer/Handler/RecurringHandler.php @@ -48,7 +48,7 @@ class RecurringHandler implements SubscribingHandlerInterface */ public function serializeCarbon(VisitorInterface $visitor, Recurring $recurring, array $type, Context $context) { - return $visitor->visitString((string)$recurring, $type, $context); + return $visitor->visitString($recurring->getValue(), $type, $context); } /** diff --git a/src/TaskManager.php b/src/TaskManager.php index 61940e9..a63c8b5 100644 --- a/src/TaskManager.php +++ b/src/TaskManager.php @@ -221,7 +221,7 @@ class TaskManager try { $this->taskwarrior->command('list'); } catch (TaskwarriorException $e) { - // to nothing + // do nothing } } @@ -281,7 +281,6 @@ class TaskManager $registry->registerSubscribingHandler(new RecurringHandler()); }) ->addDefaultHandlers() - ->setDebug(true) ->build(); }