Issue #3174108 by _pratik_, asad_ahmed, rivimey, NivethaSubramaniyan, longwave: FieldableEntityNormalizerTrait::extractBundleData() has incorrect return type

merge-requests/2836/merge
Alex Pott 2022-11-30 11:28:36 +00:00
parent 58b45dcb6f
commit 7ad6ad979a
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
1 changed files with 4 additions and 3 deletions

View File

@ -82,14 +82,15 @@ trait FieldableEntityNormalizerTrait {
* Denormalizes the bundle property so entity creation can use it.
*
* @param array $data
* The data being denormalized.
* The data being denormalized. The bundle information will be removed.
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type_definition
* The entity type definition.
*
* @throws \Symfony\Component\Serializer\Exception\UnexpectedValueException
* If the bundle value is invalid or the bundle type is ineligible.
*
* @return string
* The valid bundle name.
* @return array
* An array containing a single $bundle_key => $bundle_value pair.
*/
protected function extractBundleData(array &$data, EntityTypeInterface $entity_type_definition) {
$bundle_key = $entity_type_definition->getKey('bundle');