Stop the Transaction

@param integer|null $duration

@return void
971133
public function stop(int $duration = null)
    {
        // Stop the Timer
        $this->timer->stop();

        // Store Summary
        $this->summary['duration']  = $duration ?? round($this->timer->getDurationInMilliseconds(), 3);
        $this->summary['headers']   = (function_exists('xdebug_get_headers') === true) ? xdebug_get_headers() : [];
        $this->summary['backtrace'] = debug_backtrace($this->backtraceLimit);
    }
1035908
public function minus(Duration $duration) : Instant
    {
        if ($duration->isZero()) {
            return $this;
        }

        return $this->plus($duration->negated());
    }
437816
public function stopConnection()
    {
        $this->connections[$this->counterConnections]['time'] = (time() + microtime(true) - $this->timer);
        $this->counterConnections++;
        $this->timer = 0;
    }
677057
protected function setDuration($duration)
	{
		if ( ! is_numeric($duration))
		{
			throw new \InvalidArgumentException('The duration value must be a float type.');
		}
		
		$this->duration = abs($duration);
		
		return $this;
	}
503363
public function stopQuery()
    {
        $this->queries[$this->counter]['time'] = (time() + microtime(true) - $this->timer);
        $this->counter++;
        $this->timer = 0;
    }
866906
def stop(self):
        """"""
        if self._timer:
            self._timer.stop()
            self._timer.deleteLater()
227720
private static function _stop()
  {
    $adapter = self::$_transaction->_stored;
    
    if (is_null($adapter)) {
      Config::clearDataAdapter();
    } else {
      Config::setDataAdapter($adapter);
    }
  }
1049030
public function end($time = null)
	{
		// The timer should be ended only once.
		if(is_null($this->endTime))
		{
			$this->endTime = $time ?: microtime(true);
		}
	}
1362676
public static void setHoverDelay(Duration duration) {
        BEHAVIOR.setHoverDelay(duration == null ? Duration.millis(650) : duration);
    }
764232
public function stop()
    {
        if (null === $this->sessionId) {
            throw new Exception("Session not started");
        }

        $this->doExecute('testComplete');
        $this->sessionId = null;
    }
89080
public function getTotal($duration = null)
    {
        $total = User::getDb()->cache(function ($db) {
            return User::find()->count();
        }, $duration);
        return $total;
    }
1253284
public function Sub( $duration )
	{
		if ( ! $duration instanceof DurationValue )
		{
			throw new \InvalidArgumentException();
		}

		$duration->Value->invert = ! $duration->Value->invert;
		$this->add( $duration );
	}
1104656
public void disconnect() {
        if (connection != null && connection.isConnected()) {
            connection.close();
            transaction = null;
            setTransaction(null);
        }
    }
1178788
public function cancel()
    {
        $this->cb = null;
        $this->context = null;
        if ($this->timer !== null) {
            Timer::remove($this->timer);
            $this->timer = null;
        }
    }
1235623
public function setDuration($duration)
    {
        // get dom element
        $durationDomElement = $this->getDomElement()->getElementsByTagName('Duration')->item(0);
        if (!$durationDomElement) {
            $durationDomElement = $this->getDomElement()->ownerDocument->createElement('Duration');
            $this->getDomElement()->firstChild->appendChild($durationDomElement);
        }

        // set value
        if (is_numeric($duration)) {
            // in seconds
            $duration = $this->secondsToString($duration);
        }

        $durationDomElement->nodeValue = $duration;

        return $this;
    }
1029003
public function stop($status = 0)
    {
        $this->events->dispatch(new Events\WorkerStopping($status));

        exit($status);
    }
796441
public function stop()
    {
        if ($this->started) {
            if ($evt = $this->eventDispatcher->createTransportChangeEvent($this)) {
                $this->eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped');
                if ($evt->bubbleCancelled()) {
                    return;
                }
            }

            try {
                $this->executeCommand("QUIT\r\n", [221]);
            } catch (Swift_TransportException $e) {
            }

            try {
                $this->buffer->terminate();

                if ($evt) {
                    $this->eventDispatcher->dispatchEvent($evt, 'transportStopped');
                }
            } catch (Swift_TransportException $e) {
                $this->throwException($e);
            }
        }
        $this->started = false;
    }