UnknownConfigurationValue.php 574 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Configuration\Exception;
  4. use LogicException;
  5. use function sprintf;
  6. use function var_export;
  7. final class UnknownConfigurationValue extends LogicException implements ConfigurationException
  8. {
  9. /**
  10. * @param mixed $value
  11. */
  12. public static function new(string $key, $value): self
  13. {
  14. return new self(
  15. sprintf(
  16. 'Unknown %s for configuration "%s".',
  17. var_export($value, true),
  18. $key
  19. ),
  20. 10
  21. );
  22. }
  23. }