vendor/sentry/sentry/lib/Raven/TransactionStack.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/*
* This file is part of Raven.
*
* (c) Sentry Team
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Raven_TransactionStack
{
public function __construct()
{
$this->stack = array();
}
public function clear()
{
$this->stack = array();
}
public function peek()
{
$len = count($this->stack);
if ($len === 0) {
return null;
}
return $this->stack[$len - 1];
}
public function push($context)
{
$this->stack[] = $context;
}
/** @noinspection PhpInconsistentReturnPointsInspection
* @param string|null $context
* @return mixed
*/
public function pop($context = null)
{
if (!$context) {
return array_pop($this->stack);
}
while (!empty($this->stack)) {
if (array_pop($this->stack) === $context) {
return $context;
}
}
// @codeCoverageIgnoreStart
}
// @codeCoverageIgnoreEnd
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。