Skip to content

Commit 197fc07

Browse files
committed
Make FormatterInterface stub generic
1 parent 46d51ec commit 197fc07

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

stubs/Drupal/Core/Field/FormatterInterface.stub

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,25 @@
22

33
namespace Drupal\Core\Field;
44

5+
/**
6+
* @template TFieldItemList of \Drupal\Core\Field\FieldItemListInterface
7+
*/
58
interface FormatterInterface {
69

710
/**
8-
* @param \Drupal\Core\Field\FieldItemListInterface<\Drupal\Core\Field\FieldItemInterface> $items
11+
* @param TFieldItemList $items
912
* @param string $langcode
1013
*
1114
* @return array<int, array<int|string, mixed>>
1215
*/
1316
public function viewElements(FieldItemListInterface $items, $langcode): array;
1417

18+
/**
19+
* @param TFieldItemList $items
20+
* @param string $langcode
21+
*
22+
* @return array<int|string, mixed>
23+
*/
24+
public function view(FieldItemListInterface $items, $langcode = NULL);
25+
1526
}

0 commit comments

Comments
 (0)