src/Valkyrja/ORM/Repositories/PDORepository.php
protected function validateEntity(Entity $entity): void
    {
        if (! ($entity instanceof $this->entity)) {
            throw new InvalidEntityException(
                'This repository expects entities to be instances of '
                . $this->entity
                . '. Entity instanced from '
                . \get_class($entity)
                . ' provided instead.'
            );
        }
    }
protected function validateEntity(Entity $entity): void
    {
        if (! ($entity instanceof $this->entity)) {
            throw new InvalidEntityException(
                'This repository expects entities to be instances of '
                . $this->entity
                . '. Entity instanced from '
                . \get_class($entity)
                . ' provided instead.'
            );
        }
    }
Validate the passed entity.

@param Entity $entity

@throws InvalidEntityException

@return void