Skip to content
Snippets Groups Projects

Fix implicit nullables

5 files
+ 5
6
Compare changes
  • Side-by-side
  • Inline

Files

@@ -116,12 +116,12 @@ class FieldStorageSubscriber implements EventSubscriberInterface {
@@ -116,12 +116,12 @@ class FieldStorageSubscriber implements EventSubscriberInterface {
*
*
* @param string $entity_type_id
* @param string $entity_type_id
* The entity type ID.
* The entity type ID.
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_storage_definition
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface|null $field_storage_definition
* The field storage definition. It is only necessary to pass this if this
* The field storage definition. It is only necessary to pass this if this
* a FieldStorageConfig object during presave and as such the definition is
* a FieldStorageConfig object during presave and as such the definition is
* not yet available to the entity field manager.
* not yet available to the entity field manager.
*/
*/
public function handleEntityType($entity_type_id, FieldStorageDefinitionInterface $field_storage_definition = NULL) {
public function handleEntityType($entity_type_id, ?FieldStorageDefinitionInterface $field_storage_definition = NULL) {
$storage = $this->entityTypeManager->getStorage($entity_type_id);
$storage = $this->entityTypeManager->getStorage($entity_type_id);
$der_fields = $this->entityFieldManager->getFieldMapByFieldType('dynamic_entity_reference');
$der_fields = $this->entityFieldManager->getFieldMapByFieldType('dynamic_entity_reference');
if ($field_storage_definition && ($field_storage_definition->getType() === 'dynamic_entity_reference')) {
if ($field_storage_definition && ($field_storage_definition->getType() === 'dynamic_entity_reference')) {
Loading