InvalidArguments.php 621 B

1234567891011121314151617181920212223
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Query\Exception;
  4. use Doctrine\Migrations\Exception\MigrationException;
  5. use InvalidArgumentException;
  6. use function sprintf;
  7. class InvalidArguments extends InvalidArgumentException implements MigrationException
  8. {
  9. public static function wrongTypesArgumentCount(string $statement, int $parameters, int $types): self
  10. {
  11. return new self(sprintf(
  12. 'The number of types (%s) is higher than the number of passed parameters (%s) for the query "%s".',
  13. $types,
  14. $parameters,
  15. $statement
  16. ));
  17. }
  18. }