<?php

namespace Drupal\Core\Entity;

// RevisionableStorageInterface before TranslatableStorageInterface so that its definition of
// `loadRevision` is cached by PHPStan's reflection first. Otherwise PHPStan's reflection caches
// the PhpDoc from `EntityStorageInterface::loadRevision`.
//
// This is fragile and relies on `ContentEntityStorageInterface` only implementing this interface.
interface TranslatableRevisionableStorageInterface extends RevisionableStorageInterface, TranslatableStorageInterface {

  /**
   * @param R $entity
   * @return R
   * @template R of \Drupal\Core\Entity\RevisionableInterface
   */
  public function createRevision(RevisionableInterface $entity, bool $default = TRUE, ?bool $keep_untranslatable_fields = NULL);
  
}
