feat: Updated sabre/dev dependency to 3.2.3
- feat: Updated nestbot/carbon to 2.0.0 - fix: Replaced zendframework/zend-validator with laminas/laminas-validator - fix: Replaced zendframework/zend-stdlib with laminas/laminas-stdlib
This commit is contained in:
parent
6657fab031
commit
75ccc2d316
@ -3,24 +3,30 @@
|
|||||||
"description": "A Baikal plugin for taskwarrior",
|
"description": "A Baikal plugin for taskwarrior",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"task",
|
"task",
|
||||||
"taskwarrior",
|
"taskwarrior",
|
||||||
"GTD",
|
"GTD",
|
||||||
"Baikal",
|
"Baikal",
|
||||||
"sabre"
|
"sabre"
|
||||||
|
],
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://git.aerex.me/Aerex/Taskwarrior"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
"repositories": [{"type": "vcs", "url": "https://aerex.me/git/Aerex/Taskwarrior"}],
|
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5",
|
"php": ">=5.5",
|
||||||
"sabre/dav": "~3.1.2",
|
"sabre/dav": "~3.2.3",
|
||||||
"sabre/vobject": "^4.0",
|
"sabre/vobject": "^4.0",
|
||||||
"easycorp/easy-log-handler": "^1.0",
|
"easycorp/easy-log-handler": "^1.0",
|
||||||
"zendframework/zend-validator": "^2.10",
|
"nesbot/carbon": "^2.0.0",
|
||||||
"nesbot/carbon": "^1.14"
|
"laminas/laminas-validator": "^2.13",
|
||||||
|
"laminas/laminas-stdlib": "^3.2",
|
||||||
|
"psr/container": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit" : "> 4.8, <=6.0.0"
|
"phpunit/phpunit": "> 4.8, <=6.0.0"
|
||||||
},
|
},
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
846
composer.lock
generated
846
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -10,83 +10,83 @@ use Aerex\TaskwarriorPlugin\Exceptions\TaskwarriorCommandException;
|
|||||||
|
|
||||||
|
|
||||||
class TodoStrategy implements IStrategy {
|
class TodoStrategy implements IStrategy {
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
public function __construct(Config $config){
|
public function __construct(Config $config){
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
}
|
|
||||||
|
|
||||||
public function count($uuid){
|
|
||||||
$cmd[] = $this->config->getTaskBin();
|
|
||||||
$cmd[] = sprintf('%s count', $uuid);
|
|
||||||
return $this->executeCommand($cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function modify($task){
|
|
||||||
$cmd[] = $this->config->getTaskBin();
|
|
||||||
|
|
||||||
$uuid = $task->getUuid();
|
|
||||||
$taskJson = $task->convertToArray();
|
|
||||||
|
|
||||||
// Append modify command
|
|
||||||
$cmd[] = sprintf(' %s modify ', $uuid);
|
|
||||||
|
|
||||||
$document = $task->getDescription();
|
|
||||||
|
|
||||||
// Append as first modifier description if set
|
|
||||||
|
|
||||||
if(isset($document)){
|
|
||||||
$cmd[] = $document;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append on modifiers
|
public function count($uuid){
|
||||||
foreach($taskJson as $prop => $value){
|
$cmd[] = $this->config->getTaskBin();
|
||||||
if(isset($value) && $value != null){
|
$cmd[] = sprintf('%s count', $uuid);
|
||||||
$cmd[] = sprintf(' %s: %s ', $prop, $value);
|
return $this->executeCommand($cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function modify($task){
|
||||||
|
$cmd[] = $this->config->getTaskBin();
|
||||||
|
|
||||||
|
$uuid = $task->getUuid();
|
||||||
|
$taskJson = $task->convertToArray();
|
||||||
|
|
||||||
|
// Append modify command
|
||||||
|
$cmd[] = sprintf(' %s modify ', $uuid);
|
||||||
|
|
||||||
|
$document = $task->getDescription();
|
||||||
|
|
||||||
|
// Append as first modifier description if set
|
||||||
|
|
||||||
|
if(isset($document)){
|
||||||
|
$cmd[] = $document;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $this->executeCommand($cmd);
|
// Append on modifiers
|
||||||
|
foreach($taskJson as $prop => $value){
|
||||||
}
|
if(isset($value) && $value != null){
|
||||||
|
$cmd[] = sprintf(' %s: %s ', $prop, $value);
|
||||||
public function add(Task $task){
|
}
|
||||||
$cmd[] = $this->config->getTaskBin();
|
|
||||||
$cmd[] = 'add';
|
|
||||||
|
|
||||||
if($task->getDescription() != null){
|
|
||||||
$cmd[] = sprintf('"%s"', (string)$task->getDescription());
|
|
||||||
}
|
|
||||||
|
|
||||||
if($task->getCategories() != null){
|
|
||||||
$categories = implode(' +', (string)$task->getCategories());
|
|
||||||
$cmd[] = $categories;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($task->getDue() != null){
|
|
||||||
$cmd[] = sprintf("due:%s",$task->getDue('Y-m-dTH:i:s'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if($task->getRecurrence() != null){
|
|
||||||
$rrule = $task->getRecurrence()->getParts();
|
|
||||||
$cmd[] = sprintf('recur:%s', $rrule['FREQ']);
|
|
||||||
if(isset($rrule['UNTIL'])){
|
|
||||||
$cmd[] = sprintf('until:%s', $rrule['UNTIL']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $this->executeCommand($cmd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($task->getStatus() != null){
|
public function add(Task $task){
|
||||||
$cmd[] = sprintf('status:%s', (string)$task->getStatus());
|
$cmd[] = $this->config->getTaskBin();
|
||||||
|
$cmd[] = 'add';
|
||||||
|
|
||||||
|
if($task->getDescription() != null){
|
||||||
|
$cmd[] = sprintf('"%s"', (string)$task->getDescription());
|
||||||
|
}
|
||||||
|
|
||||||
|
if($task->getCategories() != null){
|
||||||
|
$categories = implode(' +', (string)$task->getCategories());
|
||||||
|
$cmd[] = $categories;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($task->getDue() != null){
|
||||||
|
$cmd[] = sprintf("due:%s",$task->getDue('Y-m-dTH:i:s'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if($task->getRecurrence() != null){
|
||||||
|
$rrule = $task->getRecurrence()->getParts();
|
||||||
|
$cmd[] = sprintf('recur:%s', $rrule['FREQ']);
|
||||||
|
if(isset($rrule['UNTIL'])){
|
||||||
|
$cmd[] = sprintf('until:%s', $rrule['UNTIL']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($task->getStatus() != null){
|
||||||
|
$cmd[] = sprintf('status:%s', (string)$task->getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->executeCommand($cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->executeCommand($cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private function executeCommand($command){
|
||||||
private function executeCommand($command){
|
$rcOptions = $this->config->getOptions();
|
||||||
$rcOptions = $this->config->getOptions();
|
|
||||||
|
|
||||||
foreach ($rcOptions as $rcOption) {
|
foreach ($rcOptions as $rcOption) {
|
||||||
$command[] = $rcOption;
|
$command[] = $rcOption;
|
||||||
@ -109,7 +109,7 @@ private function executeCommand($command){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
419
src/TW/Task.php
419
src/TW/Task.php
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Aerex\TaskwarriorPlugin\TW;
|
namespace Aerex\TaskwarriorPlugin\TW;
|
||||||
use Zend\Validator\Uuid;
|
use Laminas\Validator\Uuid
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Sabre\VObject\Component\VTodo;
|
use Sabre\VObject\Component\VTodo;
|
||||||
|
|
||||||
@ -11,109 +11,109 @@ use Sabre\VObject\Component\VTodo;
|
|||||||
*/
|
*/
|
||||||
class Task {
|
class Task {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @JMS\Type("string")
|
* @JMS\Type("string")
|
||||||
*/
|
*/
|
||||||
private $uuid;
|
private $uuid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @JMS\Type("string")
|
* @JMS\Type("string")
|
||||||
*/
|
*/
|
||||||
private $description;
|
private $description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $priority;
|
private $priority;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $project;
|
private $project;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Carbon
|
* @var Carbon
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $due;
|
private $due;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Carbon
|
* @var Carbon
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $wait;
|
private $wait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $tags;
|
private $tags;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float
|
* @var float
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $urgency;
|
private $urgency;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Carbon
|
* @var Carbon
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $entry;
|
private $entry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Carbon
|
* @var Carbon
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $start;
|
private $start;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $recur;
|
private $recur;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Carbon
|
* @var Carbon
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $until;
|
private $until;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Annotation[]
|
* @var Annotation[]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $annotations = [];
|
private $annotations = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Carbon
|
* @var Carbon
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $modified;
|
private $modified;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Carbon
|
* @var Carbon
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $end;
|
private $end;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $status;
|
private $status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Task[]|ArrayCollection
|
* @var Task[]|ArrayCollection
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private $depends;
|
private $depends;
|
||||||
|
|
||||||
|
|
||||||
public function __construct($UUID=null){
|
public function __construct($UUID=null){
|
||||||
@ -130,143 +130,143 @@ class Task {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUuid(){
|
public function getUuid(){
|
||||||
return $this->uuid;
|
return $this->uuid;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function convertToArray(){
|
||||||
|
$tagsString = null;
|
||||||
|
$dependsString = null;
|
||||||
|
$dueString = null;
|
||||||
|
|
||||||
|
// Process array properties
|
||||||
|
if(isset($this->tags)){
|
||||||
|
$tagsString = implode(',', $this->tags);
|
||||||
|
}
|
||||||
|
if(isset($this->depends)){
|
||||||
|
$dependsString = implode(',', $this->depends);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Process date properties
|
||||||
|
if(isset($this->due)){
|
||||||
|
$dueString = $this->due->format('Y-m-dTH:i:s');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function convertToArray(){
|
|
||||||
$tagsString = null;
|
|
||||||
$dependsString = null;
|
|
||||||
$dueString = null;
|
|
||||||
|
|
||||||
// Process array properties
|
|
||||||
if(isset($this->tags)){
|
|
||||||
$tagsString = implode(',', $this->tags);
|
|
||||||
}
|
|
||||||
if(isset($this->depends)){
|
|
||||||
$dependsString = implode(',', $this->depends);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process date properties
|
|
||||||
if(isset($this->due)){
|
|
||||||
$dueString = $this->due->format('Y-m-dTH:i:s');
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
"status" => $this->status,
|
||||||
|
"start" => $this->start,
|
||||||
|
"wait" => $this->wait,
|
||||||
|
"end" => $this->end,
|
||||||
|
"entry" => $this->entry,
|
||||||
|
"priority" => $this->priority,
|
||||||
|
"project" => $this->project,
|
||||||
|
"due" => $this->due,
|
||||||
|
"tags" => $tagsString,
|
||||||
|
"urgency" => $this->urgency,
|
||||||
|
"recu" => $this->recur,
|
||||||
|
"until" => $this->until,
|
||||||
|
"tags" => $this->annotations,
|
||||||
|
"modified" => $this->modified,
|
||||||
|
"depends" => $dependsString
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
/**
|
||||||
"status" => $this->status,
|
*
|
||||||
"start" => $this->start,
|
*
|
||||||
"wait" => $this->wait,
|
* If description is not available attempt to summary, otherwise throw Exception
|
||||||
"end" => $this->end,
|
*/
|
||||||
"entry" => $this->entry,
|
public function setDescription(VTodo $component){
|
||||||
"priority" => $this->priority,
|
if(!isset($component->DESCRIPTION) && isset($component->SUMMARY)){
|
||||||
"project" => $this->project,
|
$this->description = $component->SUMMARY;
|
||||||
"due" => $this->due,
|
} else if(!isset($component->DESCRIPTION) && !isset($component->SUMMARY)){
|
||||||
"tags" => $tagsString,
|
throw new Exception("Task must have a description or summary");
|
||||||
"urgency" => $this->urgency,
|
} else {
|
||||||
"recu" => $this->recur,
|
$this->description = $component->DESCRIPTION;
|
||||||
"until" => $this->until,
|
|
||||||
"tags" => $this->annotations,
|
|
||||||
"modified" => $this->modified,
|
|
||||||
"depends" => $dependsString
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* If description is not available attempt to summary, otherwise throw Exception
|
|
||||||
*/
|
|
||||||
public function setDescription(VTodo $component){
|
|
||||||
if(!isset($component->DESCRIPTION) && isset($component->SUMMARY)){
|
|
||||||
$this->description = $component->SUMMARY;
|
|
||||||
} else if(!isset($component->DESCRIPTION) && !isset($component->SUMMARY)){
|
|
||||||
throw new Exception("Task must have a description or summary");
|
|
||||||
} else {
|
|
||||||
$this->description = $component->DESCRIPTION;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public function getDescription(){
|
||||||
|
return $this->description;
|
||||||
public function getDescription(){
|
|
||||||
return $this->description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setEntryTime(VTodo $document){
|
|
||||||
|
|
||||||
if(isset($document->DTSTAMP)){
|
|
||||||
$this->entry = new Carbon($document->DTSTAMP->getDateTime()->format(\DateTime::W3C));
|
|
||||||
} else {
|
|
||||||
throw new Exception('Task must have a entry time');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public function setEntryTime(VTodo $document){
|
||||||
|
|
||||||
public function getEntryTime(){
|
if(isset($document->DTSTAMP)){
|
||||||
return $this->entry;
|
$this->entry = new Carbon($document->DTSTAMP->getDateTime()->format(\DateTime::W3C));
|
||||||
}
|
} else {
|
||||||
|
throw new Exception('Task must have a entry time');
|
||||||
|
}
|
||||||
|
|
||||||
public function setStartTime(VTodo $document){
|
|
||||||
if(isset($document->DTSTART)){
|
|
||||||
$this->start = new Carbon($document->DTSTART->getDateTime()->format(\DateTime::W3C));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function getStartTime(){
|
public function getEntryTime(){
|
||||||
return $this->start;
|
return $this->entry;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public function setStartTime(VTodo $document){
|
||||||
|
if(isset($document->DTSTART)){
|
||||||
|
$this->start = new Carbon($document->DTSTART->getDateTime()->format(\DateTime::W3C));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function setModifiedTime(VTodo $document){
|
public function getStartTime(){
|
||||||
|
return $this->start;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setModifiedTime(VTodo $document){
|
||||||
if(isset($document->{'LAST-MODIFIED'})){
|
if(isset($document->{'LAST-MODIFIED'})){
|
||||||
$this->modified = new Carbon($document->{'LAST-MODIFIED'}->getDateTime()->format(\DateTime::W3C));
|
$this->modified = new Carbon($document->{'LAST-MODIFIED'}->getDateTime()->format(\DateTime::W3C));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function getModifiedTime(){
|
|
||||||
return $this->modified;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setDue(VTodo $document){
|
|
||||||
|
|
||||||
if(isset($document->DUE)){
|
|
||||||
$this->due = new Carbon($document->DUE->getDateTime()->format(\DateTime::W3C));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public function getDue($format=null){
|
|
||||||
if($format != null){
|
|
||||||
return $this->due->format($format);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->due;
|
public function getModifiedTime(){
|
||||||
}
|
return $this->modified;
|
||||||
|
|
||||||
public function setStopTime(VTodo $document){
|
|
||||||
if(isset($document->DTEND)){
|
|
||||||
$this->end = new Carbon($document->DTEND->getDateTime()->format(\DateTime::W3C));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function getStopTime(){
|
public function setDue(VTodo $document){
|
||||||
return $this->end;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setCategories(VTodo $document){
|
if(isset($document->DUE)){
|
||||||
if(isset($document->CATEGORIES)){
|
$this->due = new Carbon($document->DUE->getDateTime()->format(\DateTime::W3C));
|
||||||
$this->tags = explode(',', (string)$document->CATEGORIES);
|
}
|
||||||
}
|
}
|
||||||
}
|
public function getDue($format=null){
|
||||||
|
if($format != null){
|
||||||
|
return $this->due->format($format);
|
||||||
|
}
|
||||||
|
|
||||||
public function getCategories(){
|
return $this->due;
|
||||||
return $this->tags;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function setStatus(VTodo $document){
|
public function setStopTime(VTodo $document){
|
||||||
if(isset($document->STATUS)){
|
if(isset($document->DTEND)){
|
||||||
switch((string)$document->STATUS){
|
$this->end = new Carbon($document->DTEND->getDateTime()->format(\DateTime::W3C));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStopTime(){
|
||||||
|
return $this->end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCategories(VTodo $document){
|
||||||
|
if(isset($document->CATEGORIES)){
|
||||||
|
$this->tags = explode(',', (string)$document->CATEGORIES);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCategories(){
|
||||||
|
return $this->tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setStatus(VTodo $document){
|
||||||
|
if(isset($document->STATUS)){
|
||||||
|
switch((string)$document->STATUS){
|
||||||
case 'NEEDS-ACTION':
|
case 'NEEDS-ACTION':
|
||||||
$this->status = 'pending';
|
$this->status = 'pending';
|
||||||
break;
|
break;
|
||||||
@ -276,27 +276,22 @@ public function setStatus(VTodo $document){
|
|||||||
case 'CANCELED':
|
case 'CANCELED':
|
||||||
$this->status = 'deleted';
|
$this->status = 'deleted';
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function getRecurrence(){
|
public function getRecurrence(){
|
||||||
return $this->recur;
|
return $this->recur;
|
||||||
|
|
||||||
}
|
}
|
||||||
public function setRecurrence(VTodo $document){
|
public function setRecurrence(VTodo $document){
|
||||||
if(isset($document->RRULE)){
|
if(isset($document->RRULE)){
|
||||||
$this->recur = $document->RRULE;
|
$this->recur = $document->RRULE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStatus(){
|
||||||
|
return $this->status;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function getStatus(){
|
|
||||||
return $this->status;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class TaskwarriorManager {
|
|||||||
|
|
||||||
$updatedTask = $this->taskwarrior->modify($task);
|
$updatedTask = $this->taskwarrior->modify($task);
|
||||||
|
|
||||||
return $upatedTask;
|
return $updatedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function taskExists($taskUuid){
|
public function taskExists($taskUuid){
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Sabre\VObject\Component\VCalendar;
|
use Sabre\VObject\Component\VCalendar;
|
||||||
use Sabre\DAV\Exception\BadRequest;
|
|
||||||
use Aerex\TaskwarriorPlugin\Taskwarrior\Task;
|
use Aerex\TaskwarriorPlugin\Taskwarrior\Task;
|
||||||
use Aerex\TaskwarriorPlugin\Plugin;
|
use Aerex\TaskwarriorPlugin\Plugin;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Aerex\TaskwarriorPlugin\Config;
|
|
||||||
use Sabre\DAV\Server;
|
use Sabre\DAV\Server;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use DateTimeZone;
|
|
||||||
|
|
||||||
class TaskTest extends \PHPUnit\Framework\TestCase {
|
class TaskTest extends \PHPUnit\Framework\TestCase {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user