refactor: clean up code and remove some dependencies
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
namespace Aerex\TaskwarriorPlugin;
|
||||
|
||||
use Sabre\DAV\Exception\BadRequest;
|
||||
use Sabre\VObject\Document;
|
||||
use Sabre\VObject\Component\VCalendar;
|
||||
use Sabre\HTTP\RequestInterface;
|
||||
use Sabre\HTTP\ResponseInterface;
|
||||
use Sabre\Xml\ParseException;
|
||||
use Sabre\DAV\ServerPlugin;
|
||||
use Sabre\DAV\Server;
|
||||
use Aerex\TaskwarriorPlugin\iCalEventProcessor;
|
||||
use Aerex\TaskwarriorPlugin\CalendarProcessor;
|
||||
use Aerex\TaskwarriorPlugin\Config;
|
||||
|
||||
/**
|
||||
@@ -49,7 +49,7 @@ class Plugin extends ServerPlugin {
|
||||
if(!is_null($TWCalManager)){
|
||||
$this->twCalManager = $TWCalManager;
|
||||
} else {
|
||||
$this->twCalManager = new iCalEventProcessor();
|
||||
$this->twCalManager = new CalendarProcessor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class Plugin extends ServerPlugin {
|
||||
*
|
||||
* @param VCalendar $vCal parsed calendar object
|
||||
*/
|
||||
function processCalendarEventForTaskwarrior(Document $vCal){
|
||||
function processCalendarEventForTaskwarrior(VCalendar $vCal){
|
||||
try {
|
||||
$this->twCalManager->importTask($vCal->VTODO);
|
||||
} catch(BadRequest $e){
|
||||
|
Reference in New Issue
Block a user