NoMigrationsFoundWithCriteria.php 552 B

12345678910111213141516171819202122
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Exception;
  4. use RuntimeException;
  5. use function sprintf;
  6. final class NoMigrationsFoundWithCriteria extends RuntimeException implements MigrationException
  7. {
  8. public static function new(?string $criteria = null): self
  9. {
  10. return new self(
  11. $criteria !== null
  12. ? sprintf('Could not find any migrations matching your criteria (%s).', $criteria)
  13. : 'Could not find any migrations matching your criteria.',
  14. 4
  15. );
  16. }
  17. }