PDOQueryImplementation.php 728 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Doctrine\DBAL\Driver;
  3. use PDOStatement;
  4. use function func_get_args;
  5. use const PHP_VERSION_ID;
  6. if (PHP_VERSION_ID >= 80000) {
  7. /**
  8. * @internal
  9. */
  10. trait PDOQueryImplementation
  11. {
  12. /**
  13. * @return PDOStatement
  14. */
  15. public function query(?string $query = null, ?int $fetchMode = null, mixed ...$fetchModeArgs)
  16. {
  17. return $this->doQuery($query, $fetchMode, ...$fetchModeArgs);
  18. }
  19. }
  20. } else {
  21. /**
  22. * @internal
  23. */
  24. trait PDOQueryImplementation
  25. {
  26. /**
  27. * @return PDOStatement
  28. */
  29. public function query()
  30. {
  31. return $this->doQuery(...func_get_args());
  32. }
  33. }
  34. }