aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php')
-rw-r--r--vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
index f2dbdeba3..7eb3e0bb7 100644
--- a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
+++ b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
@@ -38,6 +38,8 @@ class DateTime extends Property
* Sets a multi-valued property.
*
* You may also specify DateTime objects here.
+ *
+ * @param array $parts
*/
public function setParts(array $parts)
{
@@ -173,6 +175,7 @@ class DateTime extends Property
/**
* Sets the property as a DateTime object.
*
+ * @param DateTimeInterface $dt
* @param bool isFloating If set to true, timezones will be ignored
*/
public function setDateTime(DateTimeInterface $dt, $isFloating = false)
@@ -276,6 +279,8 @@ class DateTime extends Property
* Sets the json value, as it would appear in a jCard or jCal object.
*
* The value must always be an array.
+ *
+ * @param array $value
*/
public function setJsonValue(array $value)
{
@@ -338,8 +343,8 @@ class DateTime extends Property
$messages = parent::validate($options);
$valueType = $this->getValueType();
$values = $this->getParts();
- foreach ($values as $value) {
- try {
+ try {
+ foreach ($values as $value) {
switch ($valueType) {
case 'DATE':
DateTimeParser::parseDate($value);
@@ -348,14 +353,13 @@ class DateTime extends Property
DateTimeParser::parseDateTime($value);
break;
}
- } catch (InvalidDataException $e) {
- $messages[] = [
- 'level' => 3,
- 'message' => 'The supplied value ('.$value.') is not a correct '.$valueType,
- 'node' => $this,
- ];
- break;
}
+ } catch (InvalidDataException $e) {
+ $messages[] = [
+ 'level' => 3,
+ 'message' => 'The supplied value ('.$value.') is not a correct '.$valueType,
+ 'node' => $this,
+ ];
}
return $messages;