fix export collection
This commit is contained in:
parent
91e3fa947b
commit
28b61adc99
|
@ -33,7 +33,7 @@ class Taskwarrior
|
||||||
array(
|
array(
|
||||||
'rc:' . $taskrc,
|
'rc:' . $taskrc,
|
||||||
'rc.data.location=' . $taskData,
|
'rc.data.location=' . $taskData,
|
||||||
'rc.json.array=false',
|
'rc.json.array=true',
|
||||||
'rc.confirmation=no',
|
'rc.confirmation=no',
|
||||||
),
|
),
|
||||||
$rcOptions
|
$rcOptions
|
||||||
|
@ -157,21 +157,11 @@ class Taskwarrior
|
||||||
return $tasks;
|
return $tasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
$jsons = explode("\n", $json);
|
|
||||||
|
|
||||||
foreach ($jsons as $row) {
|
|
||||||
if (trim($row) == "") {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$serializer = SerializerBuilder::create()
|
$serializer = SerializerBuilder::create()
|
||||||
->addDefaultHandlers()
|
->addDefaultHandlers()
|
||||||
->build();
|
->build();
|
||||||
|
|
||||||
$tasks[] = $serializer->deserialize($row, 'DavidBadura\Taskwarrior\Task', 'json');
|
return $serializer->deserialize($json, 'array<DavidBadura\Taskwarrior\Task>', 'json');
|
||||||
}
|
|
||||||
|
|
||||||
return $tasks;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue