vendor/sentry/sentry-symfony/src/Tracing/Doctrine/DBAL/TracingStatementForV3.php line 43

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sentry\SentryBundle\Tracing\Doctrine\DBAL;
  4. use Doctrine\DBAL\Driver\Result;
  5. use Doctrine\DBAL\Driver\Statement;
  6. use Doctrine\DBAL\ParameterType;
  7. use Sentry\Tracing\SpanContext;
  8. /**
  9.  * @internal
  10.  */
  11. final class TracingStatementForV3 extends AbstractTracingStatement implements Statement
  12. {
  13.     /**
  14.      * {@inheritdoc}
  15.      */
  16.     public function bindValue($param$value$type ParameterType::STRING): bool
  17.     {
  18.         return $this->decoratedStatement->bindValue($param$value$type);
  19.     }
  20.     /**
  21.      * {@inheritdoc}
  22.      */
  23.     public function bindParam($param, &$variable$type ParameterType::STRING$length null): bool
  24.     {
  25.         return $this->decoratedStatement->bindParam($param$variable$type, ...\array_slice(\func_get_args(), 3));
  26.     }
  27.     /**
  28.      * {@inheritdoc}
  29.      */
  30.     public function execute($params null): Result
  31.     {
  32.         $spanContext = new SpanContext();
  33.         $spanContext->setOp(self::SPAN_OP_STMT_EXECUTE);
  34.         $spanContext->setDescription($this->sqlQuery);
  35.         $spanContext->setData($this->spanData);
  36.         return $this->traceFunction($spanContext, [$this->decoratedStatement'execute'], $params);
  37.     }
  38. }