add doctrine array collection

This commit is contained in:
DavidBadura
2015-04-22 10:44:11 +00:00
parent 43318c7c0e
commit 562f00171a
4 changed files with 51 additions and 62 deletions

View File

@@ -5,6 +5,7 @@ namespace DavidBadura\Taskwarrior;
use DavidBadura\Taskwarrior\Exception\TaskwarriorException;
use DavidBadura\Taskwarrior\Serializer\Handler\CarbonHandler;
use DavidBadura\Taskwarrior\Serializer\Handler\RecurringHandler;
use Doctrine\Common\Collections\ArrayCollection;
use JMS\Serializer\Handler\HandlerRegistryInterface;
use JMS\Serializer\JsonSerializationVisitor;
use JMS\Serializer\Naming\CamelCaseNamingStrategy;
@@ -90,7 +91,7 @@ class TaskManager
/**
* @param string|array $filter
* @return Task[]
* @return Task[]|ArrayCollection
*/
public function filterAll($filter = null)
{
@@ -112,12 +113,12 @@ class TaskManager
$this->tasks[$task->getUuid()] = $task;
}
return $result;
return new ArrayCollection($result);
}
/**
* @param string|array $filter
* @return Task[]
* @return Task[]|ArrayCollection
*/
public function filter($filter = null)
{