diff --git a/stubs/Drupal/datetime_range/Plugin/Field/FieldType/DateRangeItem.stub b/stubs/Drupal/datetime_range/Plugin/Field/FieldType/DateRangeItem.stub new file mode 100644 index 00000000..a081a3c0 --- /dev/null +++ b/stubs/Drupal/datetime_range/Plugin/Field/FieldType/DateRangeItem.stub @@ -0,0 +1,17 @@ +value); assertType('Drupal\Core\Datetime\DrupalDateTime|null', $datetime_field->date); +// DateRangeItem. +$daterange_field = $node->get('field_daterange')->first(); +assert($daterange_field instanceof DateRangeItem); +assertType(DateRangeItem::class, $daterange_field); +assertType('string|null', $daterange_field->value); +assertType('\Drupal\Core\Datetime\DrupalDateTime|null', $daterange_field->start_date); +assertType('string|null', $daterange_field->end_value); +assertType('\Drupal\Core\Datetime\DrupalDateTime|null', $daterange_field->end_date); + // FileItem. $file_field = $node->get('field_file')->first(); assert($file_field instanceof FileItem);