Permalink
Browse files

tweak(Entry/EventException): some code cleanup

after "add boolean type, support appointmentReplyTime"

see commit dfb2553
as proposed by @alecpl

Change-Id: I0ae06792abd1bebbf0ff352fdb8829d0715916df
  • Loading branch information...
pschuele committed Jan 25, 2019
1 parent 1809f2b commit 8bad58fff8f549b27a2f1e4872bd5053a97d542e
Showing with 7 additions and 8 deletions.
  1. +1 −5 lib/Syncroton/Model/AXMLEntry.php
  2. +6 −3 lib/Syncroton/Model/EventException.php
@@ -88,11 +88,7 @@ public function appendXML(DOMElement $domParrent, Syncroton_Model_IDevice $devic
}
} else {
if ($elementProperties['type'] === 'boolean') {
if ($value) {
$value = '1';
} else {
$value = '0';
}
$value = ($value) ? '1' : '0';
}
$element = $domParrent->ownerDocument->createElementNS($nameSpace, ucfirst($elementName));
$this->_appendXMLElement($device, $element, $elementProperties, $value);
@@ -39,7 +39,11 @@ class Syncroton_Model_EventException extends Syncroton_Model_AXMLEntry
'Calendar' => array(
'allDayEvent' => array('type' => 'number'),
'appointmentReplyTime' => array('type' => 'datetime'),
'attendees' => array('type' => 'container', 'childElement' => 'attendee', 'class' => 'Syncroton_Model_EventAttendee'),
'attendees' => array(
'type' => 'container',
'childElement' => 'attendee',
'class' => 'Syncroton_Model_EventAttendee'
),
'busyStatus' => array('type' => 'number'),
'categories' => array('type' => 'container', 'childElement' => 'category'),
'deleted' => array('type' => 'number'),
@@ -54,7 +58,6 @@ class Syncroton_Model_EventException extends Syncroton_Model_AXMLEntry
'sensitivity' => array('type' => 'number'),
'startTime' => array('type' => 'datetime'),
'subject' => array('type' => 'string'),
'appointmentReplyTime' => array('type' => 'datetime'),
)
);
}
}

0 comments on commit 8bad58f

Please sign in to comment.