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, 9 insertions, 13 deletions
diff --git a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
index 7eb3e0bb7..f2dbdeba3 100644
--- a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
+++ b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
@@ -38,8 +38,6 @@ class DateTime extends Property
* Sets a multi-valued property.
*
* You may also specify DateTime objects here.
- *
- * @param array $parts
*/
public function setParts(array $parts)
{
@@ -175,7 +173,6 @@ 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)
@@ -279,8 +276,6 @@ 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)
{
@@ -343,8 +338,8 @@ class DateTime extends Property
$messages = parent::validate($options);
$valueType = $this->getValueType();
$values = $this->getParts();
- try {
- foreach ($values as $value) {
+ foreach ($values as $value) {
+ try {
switch ($valueType) {
case 'DATE':
DateTimeParser::parseDate($value);
@@ -353,13 +348,14 @@ 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;