diff --git a/src/DebugBar/Bridge/CacheCacheCollector.php b/src/DebugBar/Bridge/CacheCacheCollector.php index 3d841c6..7e7f46f 100644 --- a/src/DebugBar/Bridge/CacheCacheCollector.php +++ b/src/DebugBar/Bridge/CacheCacheCollector.php @@ -31,6 +31,13 @@ class CacheCacheCollector extends MonologCollector { protected $logger; + /** + * CacheCacheCollector constructor. + * @param Cache|null $cache + * @param Logger|null $logger + * @param bool $level + * @param bool $bubble + */ public function __construct(Cache $cache = null, Logger $logger = null, $level = Logger::DEBUG, $bubble = true) { parent::__construct(null, $level, $bubble); @@ -45,6 +52,9 @@ class CacheCacheCollector extends MonologCollector } } + /** + * @param Cache $cache + */ public function addCache(Cache $cache) { $backend = $cache->getBackend(); @@ -55,6 +65,9 @@ class CacheCacheCollector extends MonologCollector $this->addLogger($backend->getLogger()); } + /** + * @return string + */ public function getName() { return 'cache'; diff --git a/src/DebugBar/Bridge/DoctrineCollector.php b/src/DebugBar/Bridge/DoctrineCollector.php index 6fa358e..7c91da9 100644 --- a/src/DebugBar/Bridge/DoctrineCollector.php +++ b/src/DebugBar/Bridge/DoctrineCollector.php @@ -34,6 +34,11 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid { protected $debugStack; + /** + * DoctrineCollector constructor. + * @param $debugStackOrEntityManager + * @throws DebugBarException + */ public function __construct($debugStackOrEntityManager) { if ($debugStackOrEntityManager instanceof EntityManager) { @@ -45,6 +50,9 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid $this->debugStack = $debugStackOrEntityManager; } + /** + * @return array + */ public function collect() { $queries = array(); @@ -67,11 +75,17 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid ); } + /** + * @return string + */ public function getName() { return 'doctrine'; } + /** + * @return array + */ public function getWidgets() { return array( @@ -88,6 +102,9 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid ); } + /** + * @return array + */ public function getAssets() { return array( diff --git a/src/DebugBar/Bridge/MonologCollector.php b/src/DebugBar/Bridge/MonologCollector.php index 609d5c5..f24b296 100644 --- a/src/DebugBar/Bridge/MonologCollector.php +++ b/src/DebugBar/Bridge/MonologCollector.php @@ -56,6 +56,9 @@ class MonologCollector extends AbstractProcessingHandler implements DataCollecto $logger->pushHandler($this); } + /** + * @param array $record + */ protected function write(array $record) { $this->records[] = array( @@ -66,11 +69,17 @@ class MonologCollector extends AbstractProcessingHandler implements DataCollecto ); } + /** + * @return array + */ public function getMessages() { return $this->records; } + /** + * @return array + */ public function collect() { return array( @@ -79,11 +88,17 @@ class MonologCollector extends AbstractProcessingHandler implements DataCollecto ); } + /** + * @return string + */ public function getName() { return $this->name; } + /** + * @return array + */ public function getWidgets() { $name = $this->getName(); diff --git a/src/DebugBar/DataCollector/AggregatedCollector.php b/src/DebugBar/DataCollector/AggregatedCollector.php index 6c8e711..c1fd96a 100644 --- a/src/DebugBar/DataCollector/AggregatedCollector.php +++ b/src/DebugBar/DataCollector/AggregatedCollector.php @@ -100,6 +100,9 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess return $this->sort; } + /** + * @return array + */ public function collect() { $aggregate = array(); @@ -136,6 +139,9 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess return $data; } + /** + * @return string + */ public function getName() { return $this->name; @@ -144,21 +150,38 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess // -------------------------------------------- // ArrayAccess implementation + /** + * @param mixed $key + * @param mixed $value + * @throws DebugBarException + */ public function offsetSet($key, $value) { throw new DebugBarException("AggregatedCollector[] is read-only"); } + /** + * @param mixed $key + * @return mixed + */ public function offsetGet($key) { return $this->collectors[$key]; } + /** + * @param mixed $key + * @return bool + */ public function offsetExists($key) { return isset($this->collectors[$key]); } + /** + * @param mixed $key + * @throws DebugBarException + */ public function offsetUnset($key) { throw new DebugBarException("AggregatedCollector[] is read-only"); diff --git a/src/DebugBar/DataCollector/ConfigCollector.php b/src/DebugBar/DataCollector/ConfigCollector.php index 7b4ac90..692b547 100644 --- a/src/DebugBar/DataCollector/ConfigCollector.php +++ b/src/DebugBar/DataCollector/ConfigCollector.php @@ -39,6 +39,9 @@ class ConfigCollector extends DataCollector implements Renderable $this->data = $data; } + /** + * @return array + */ public function collect() { $data = array(); @@ -51,11 +54,17 @@ class ConfigCollector extends DataCollector implements Renderable return $data; } + /** + * @return string + */ public function getName() { return $this->name; } + /** + * @return array + */ public function getWidgets() { $name = $this->getName(); diff --git a/src/DebugBar/DataCollector/DataCollector.php b/src/DebugBar/DataCollector/DataCollector.php index 081f66e..aae5cba 100644 --- a/src/DebugBar/DataCollector/DataCollector.php +++ b/src/DebugBar/DataCollector/DataCollector.php @@ -49,6 +49,7 @@ abstract class DataCollector implements DataCollectorInterface * Sets the data formater instance used by this collector * * @param DataFormatterInterface $formater + * @return $this */ public function setDataFormatter(DataFormatterInterface $formater) { @@ -56,6 +57,9 @@ abstract class DataCollector implements DataCollectorInterface return $this; } + /** + * @return DataFormatterInterface + */ public function getDataFormatter() { if ($this->dataFormater === null) { diff --git a/src/DebugBar/DataCollector/ExceptionsCollector.php b/src/DebugBar/DataCollector/ExceptionsCollector.php index 8bf08d4..9959a30 100644 --- a/src/DebugBar/DataCollector/ExceptionsCollector.php +++ b/src/DebugBar/DataCollector/ExceptionsCollector.php @@ -88,11 +88,17 @@ class ExceptionsCollector extends DataCollector implements Renderable ); } + /** + * @return string + */ public function getName() { return 'exceptions'; } + /** + * @return array + */ public function getWidgets() { return array( diff --git a/src/DebugBar/DataCollector/LocalizationCollector.php b/src/DebugBar/DataCollector/LocalizationCollector.php index 98b9e63..276cd0e 100644 --- a/src/DebugBar/DataCollector/LocalizationCollector.php +++ b/src/DebugBar/DataCollector/LocalizationCollector.php @@ -35,6 +35,9 @@ class LocalizationCollector extends DataCollector implements Renderable return textdomain(); } + /** + * @return array + */ public function collect() { return array( @@ -43,11 +46,17 @@ class LocalizationCollector extends DataCollector implements Renderable ); } + /** + * @return string + */ public function getName() { return 'localization'; } + /** + * @return array + */ public function getWidgets() { return array( diff --git a/src/DebugBar/DataCollector/MemoryCollector.php b/src/DebugBar/DataCollector/MemoryCollector.php index 1a27c40..462c616 100644 --- a/src/DebugBar/DataCollector/MemoryCollector.php +++ b/src/DebugBar/DataCollector/MemoryCollector.php @@ -35,6 +35,9 @@ class MemoryCollector extends DataCollector implements Renderable $this->peakUsage = memory_get_peak_usage(true); } + /** + * @return array + */ public function collect() { $this->updatePeakUsage(); @@ -44,11 +47,17 @@ class MemoryCollector extends DataCollector implements Renderable ); } + /** + * @return string + */ public function getName() { return 'memory'; } + /** + * @return array + */ public function getWidgets() { return array( diff --git a/src/DebugBar/DataCollector/MessagesCollector.php b/src/DebugBar/DataCollector/MessagesCollector.php index dc88cf7..b980629 100644 --- a/src/DebugBar/DataCollector/MessagesCollector.php +++ b/src/DebugBar/DataCollector/MessagesCollector.php @@ -38,6 +38,7 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface * Sets the data formater instance used by this collector * * @param DataFormatterInterface $formater + * @return $this */ public function setDataFormatter(DataFormatterInterface $formater) { @@ -45,6 +46,9 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface return $this; } + /** + * @return DataFormatterInterface + */ public function getDataFormatter() { if ($this->dataFormater === null) { @@ -85,6 +89,9 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface $this->aggregates[] = $messages; } + /** + * @return array + */ public function getMessages() { $messages = $this->messages; @@ -107,6 +114,11 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface return $messages; } + /** + * @param $level + * @param $message + * @param array $context + */ public function log($level, $message, array $context = array()) { $this->addMessage($message, $level); @@ -120,6 +132,9 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface $this->messages = array(); } + /** + * @return array + */ public function collect() { $messages = $this->getMessages(); @@ -129,11 +144,17 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface ); } + /** + * @return string + */ public function getName() { return $this->name; } + /** + * @return array + */ public function getWidgets() { $name = $this->getName(); diff --git a/src/DebugBar/DataCollector/PDO/PDOCollector.php b/src/DebugBar/DataCollector/PDO/PDOCollector.php index 37e7b02..e9952ed 100644 --- a/src/DebugBar/DataCollector/PDO/PDOCollector.php +++ b/src/DebugBar/DataCollector/PDO/PDOCollector.php @@ -43,11 +43,17 @@ class PDOCollector extends DataCollector implements Renderable, AssetProvider $this->sqlQuotationChar = $quotationChar; } + /** + * @return bool + */ public function isSqlRenderedWithParams() { return $this->renderSqlWithParams; } + /** + * @return string + */ public function getSqlQuotationChar() { return $this->sqlQuotationChar; @@ -77,6 +83,9 @@ class PDOCollector extends DataCollector implements Renderable, AssetProvider return $this->connections; } + /** + * @return array + */ public function collect() { $data = array( @@ -151,11 +160,17 @@ class PDOCollector extends DataCollector implements Renderable, AssetProvider ); } + /** + * @return string + */ public function getName() { return 'pdo'; } + /** + * @return array + */ public function getWidgets() { return array( @@ -172,6 +187,9 @@ class PDOCollector extends DataCollector implements Renderable, AssetProvider ); } + /** + * @return array + */ public function getAssets() { return array( diff --git a/src/DebugBar/DataCollector/PDO/TraceablePDO.php b/src/DebugBar/DataCollector/PDO/TraceablePDO.php index 5f7688b..fcee4c4 100644 --- a/src/DebugBar/DataCollector/PDO/TraceablePDO.php +++ b/src/DebugBar/DataCollector/PDO/TraceablePDO.php @@ -179,16 +179,29 @@ class TraceablePDO extends PDO return array_filter($this->executedStatements, function ($s) { return !$s->isSuccess(); }); } + /** + * @param $name + * @return mixed + */ public function __get($name) { return $this->pdo->$name; } + /** + * @param $name + * @param $value + */ public function __set($name, $value) { $this->pdo->$name = $value; } + /** + * @param $name + * @param $args + * @return mixed + */ public function __call($name, $args) { return call_user_func_array(array($this->pdo, $name), $args); diff --git a/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php b/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php index 4eb75fd..31623d1 100644 --- a/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php +++ b/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php @@ -15,11 +15,23 @@ class TraceablePDOStatement extends PDOStatement protected $boundParameters = array(); + /** + * TraceablePDOStatement constructor. + * @param TraceablePDO $pdo + */ protected function __construct(TraceablePDO $pdo) { $this->pdo = $pdo; } + /** + * @param mixed $column + * @param mixed $param + * @param null $type + * @param null $maxlen + * @param null $driverdata + * @return mixed + */ public function bindColumn($column, &$param, $type = null, $maxlen = null, $driverdata = null) { $this->boundParameters[$column] = $param; @@ -27,6 +39,14 @@ class TraceablePDOStatement extends PDOStatement return call_user_func_array(array("parent", 'bindColumn'), $args); } + /** + * @param mixed $param + * @param mixed $var + * @param int $data_type + * @param null $length + * @param null $driver_options + * @return mixed + */ public function bindParam($param, &$var, $data_type = PDO::PARAM_STR, $length = null, $driver_options = null) { $this->boundParameters[$param] = $var; @@ -34,12 +54,23 @@ class TraceablePDOStatement extends PDOStatement return call_user_func_array(array("parent", 'bindParam'), $args); } + /** + * @param mixed $param + * @param mixed $value + * @param int $data_type + * @return mixed + */ public function bindValue($param, $value, $data_type = PDO::PARAM_STR) { $this->boundParameters[$param] = $value; return call_user_func_array(array("parent", 'bindValue'), func_get_args()); } + /** + * @param null $params + * @return bool + * @throws null + */ public function execute($params = null) { $preparedId = spl_object_hash($this); diff --git a/src/DebugBar/DataCollector/PDO/TracedStatement.php b/src/DebugBar/DataCollector/PDO/TracedStatement.php index ae58a07..1ccc583 100644 --- a/src/DebugBar/DataCollector/PDO/TracedStatement.php +++ b/src/DebugBar/DataCollector/PDO/TracedStatement.php @@ -31,11 +31,6 @@ class TracedStatement * @param string $sql * @param array $params * @param string $preparedId - * @param integer $rowCount - * @param integer $startTime - * @param integer $endTime - * @param integer $memoryUsage - * @param \Exception $e */ public function __construct($sql, array $params = array(), $preparedId = null) { @@ -44,12 +39,22 @@ class TracedStatement $this->preparedId = $preparedId; } + /** + * @param null $startTime + * @param null $startMemory + */ public function start($startTime = null, $startMemory = null) { $this->startTime = $startTime ?: microtime(true); $this->startMemory = $startMemory ?: memory_get_usage(true); } + /** + * @param \Exception|null $exception + * @param int $rowCount + * @param null $endTime + * @param null $endMemory + */ public function end(\Exception $exception = null, $rowCount = 0, $endTime = null, $endMemory = null) { $this->endTime = $endTime ?: microtime(true); @@ -158,11 +163,17 @@ class TracedStatement return $this->preparedId !== null; } + /** + * @return mixed + */ public function getStartTime() { return $this->startTime; } + /** + * @return mixed + */ public function getEndTime() { return $this->endTime; @@ -178,11 +189,17 @@ class TracedStatement return $this->duration; } + /** + * @return mixed + */ public function getStartMemory() { return $this->startMemory; } + /** + * @return mixed + */ public function getEndMemory() { return $this->endMemory; diff --git a/src/DebugBar/DataCollector/PhpInfoCollector.php b/src/DebugBar/DataCollector/PhpInfoCollector.php index 9e97316..8901947 100644 --- a/src/DebugBar/DataCollector/PhpInfoCollector.php +++ b/src/DebugBar/DataCollector/PhpInfoCollector.php @@ -15,6 +15,9 @@ namespace DebugBar\DataCollector; */ class PhpInfoCollector extends DataCollector { + /** + * @return array + */ public function collect() { return array( @@ -23,6 +26,9 @@ class PhpInfoCollector extends DataCollector ); } + /** + * @return string + */ public function getName() { return 'php'; diff --git a/src/DebugBar/DataCollector/RequestDataCollector.php b/src/DebugBar/DataCollector/RequestDataCollector.php index 1b8de32..6306e48 100644 --- a/src/DebugBar/DataCollector/RequestDataCollector.php +++ b/src/DebugBar/DataCollector/RequestDataCollector.php @@ -15,6 +15,9 @@ namespace DebugBar\DataCollector; */ class RequestDataCollector extends DataCollector implements Renderable { + /** + * @return array + */ public function collect() { $vars = array('_GET', '_POST', '_SESSION', '_COOKIE', '_SERVER'); @@ -29,11 +32,17 @@ class RequestDataCollector extends DataCollector implements Renderable return $data; } + /** + * @return string + */ public function getName() { return 'request'; } + /** + * @return array + */ public function getWidgets() { return array( diff --git a/src/DebugBar/DataCollector/TimeDataCollector.php b/src/DebugBar/DataCollector/TimeDataCollector.php index 19e5a63..5bbed41 100644 --- a/src/DebugBar/DataCollector/TimeDataCollector.php +++ b/src/DebugBar/DataCollector/TimeDataCollector.php @@ -187,6 +187,10 @@ class TimeDataCollector extends DataCollector implements Renderable return microtime(true) - $this->requestStartTime; } + /** + * @return array + * @throws DebugBarException + */ public function collect() { $this->requestEndTime = microtime(true); @@ -203,11 +207,17 @@ class TimeDataCollector extends DataCollector implements Renderable ); } + /** + * @return string + */ public function getName() { return 'time'; } + /** + * @return array + */ public function getWidgets() { return array( diff --git a/src/DebugBar/DataFormatter/DataFormatter.php b/src/DebugBar/DataFormatter/DataFormatter.php index 41e2775..27f4e9a 100644 --- a/src/DebugBar/DataFormatter/DataFormatter.php +++ b/src/DebugBar/DataFormatter/DataFormatter.php @@ -15,12 +15,19 @@ use Symfony\Component\VarDumper\Dumper\CliDumper; class DataFormatter implements DataFormatterInterface { + /** + * DataFormatter constructor. + */ public function __construct() { $this->cloner = new VarCloner(); $this->dumper = new CliDumper(); } + /** + * @param $data + * @return string + */ public function formatVar($data) { $output = ''; @@ -39,6 +46,10 @@ class DataFormatter implements DataFormatterInterface return trim($output); } + /** + * @param float $seconds + * @return string + */ public function formatDuration($seconds) { if ($seconds < 0.001) { @@ -49,6 +60,11 @@ class DataFormatter implements DataFormatterInterface return round($seconds, 2) . 's'; } + /** + * @param string $size + * @param int $precision + * @return string + */ public function formatBytes($size, $precision = 2) { if ($size === 0 || $size === null) { diff --git a/src/DebugBar/DebugBar.php b/src/DebugBar/DebugBar.php index 6b11437..d771d2a 100644 --- a/src/DebugBar/DebugBar.php +++ b/src/DebugBar/DebugBar.php @@ -84,6 +84,7 @@ class DebugBar implements ArrayAccess * * @param string $name * @return DataCollectorInterface + * @throws DebugBarException */ public function getCollector($name) { @@ -107,6 +108,7 @@ class DebugBar implements ArrayAccess * Sets the request id generator * * @param RequestIdGeneratorInterface $generator + * @return $this */ public function setRequestIdGenerator(RequestIdGeneratorInterface $generator) { @@ -142,6 +144,7 @@ class DebugBar implements ArrayAccess * Sets the storage backend to use to store the collected data * * @param StorageInterface $storage + * @return $this */ public function setStorage(StorageInterface $storage = null) { @@ -171,6 +174,7 @@ class DebugBar implements ArrayAccess * Sets the HTTP driver * * @param HttpDriverInterface $driver + * @return $this */ public function setHttpDriver(HttpDriverInterface $driver) { @@ -287,6 +291,7 @@ class DebugBar implements ArrayAccess * @param bool $useOpenHandler * @param string $headerName * @param integer $maxHeaderLength + * @return $this */ public function sendDataInHeaders($useOpenHandler = null, $headerName = 'phpdebugbar', $maxHeaderLength = 4096) { @@ -369,6 +374,7 @@ class DebugBar implements ArrayAccess * Sets the key to use in the $_SESSION array * * @param string $ns + * @return $this */ public function setStackDataSessionNamespace($ns) { @@ -391,6 +397,7 @@ class DebugBar implements ArrayAccess * if a storage is enabled * * @param boolean $enabled + * @return $this */ public function setStackAlwaysUseSessionStorage($enabled = true) { @@ -411,8 +418,8 @@ class DebugBar implements ArrayAccess /** * Initializes the session for stacked data - * * @return HttpDriverInterface + * @throws DebugBarException */ protected function initStackSession() { @@ -430,9 +437,8 @@ class DebugBar implements ArrayAccess /** * Returns a JavascriptRenderer for this instance - * * @param string $baseUrl - * @param string $basePathng + * @param string $basePath * @return JavascriptRenderer */ public function getJavascriptRenderer($baseUrl = null, $basePath = null) diff --git a/src/DebugBar/HttpDriverInterface.php b/src/DebugBar/HttpDriverInterface.php index f91b139..1a7a3cf 100644 --- a/src/DebugBar/HttpDriverInterface.php +++ b/src/DebugBar/HttpDriverInterface.php @@ -19,7 +19,8 @@ interface HttpDriverInterface /** * Sets HTTP headers * - * @param string $headers + * @param array $headers + * @return */ function setHeaders(array $headers); diff --git a/src/DebugBar/JavascriptRenderer.php b/src/DebugBar/JavascriptRenderer.php index d4ac750..5575cae 100644 --- a/src/DebugBar/JavascriptRenderer.php +++ b/src/DebugBar/JavascriptRenderer.php @@ -764,6 +764,8 @@ class JavascriptRenderer * * @param boolean $here Set position of HTML. True if is to current position or false for end file * @param boolean $initialize Whether to render the de bug bar initialization code + * @param bool $renderStackedData + * @param bool $head * @return string Return "{--DEBUGBAR_OB_START_REPLACE_ME--}" or return an empty string if $here == false */ public function renderOnShutdown($here = true, $initialize = true, $renderStackedData = true, $head = false) @@ -795,6 +797,8 @@ class JavascriptRenderer * * @param boolean $here Set position of HTML. True if is to current position or false for end file * @param boolean $initialize Whether to render the de bug bar initialization code + * @param bool $renderStackedData + * @param bool $head */ public function replaceTagInBuffer($here = true, $initialize = true, $renderStackedData = true, $head = false) { @@ -815,7 +819,8 @@ class JavascriptRenderer * * AJAX request should not render the initialization code. * - * @param boolean $initialize Whether to render the de bug bar initialization code + * @param boolean $initialize Whether or not to render the debug bar initialization code + * @param bool $renderStackedData Whether or not to render the stacked data * @return string */ public function render($initialize = true, $renderStackedData = true) @@ -945,6 +950,7 @@ class JavascriptRenderer * * @param string $requestId * @param array $data + * @param null $suffix * @return string */ protected function getAddDatasetCode($requestId, $data, $suffix = null) diff --git a/src/DebugBar/OpenHandler.php b/src/DebugBar/OpenHandler.php index cbabea2..ee4df41 100644 --- a/src/DebugBar/OpenHandler.php +++ b/src/DebugBar/OpenHandler.php @@ -19,6 +19,7 @@ class OpenHandler /** * @param DebugBar $debugBar + * @throws DebugBarException */ public function __construct(DebugBar $debugBar) { @@ -32,6 +33,10 @@ class OpenHandler * Handles the current request * * @param array $request Request data + * @param bool $echo + * @param bool $sendHeader + * @return string + * @throws DebugBarException */ public function handle($request = null, $echo = true, $sendHeader = true) { @@ -62,6 +67,8 @@ class OpenHandler /** * Find operation + * @param $request + * @return array */ protected function find($request) { @@ -87,6 +94,9 @@ class OpenHandler /** * Get operation + * @param $request + * @return array + * @throws DebugBarException */ protected function get($request) { diff --git a/src/DebugBar/PhpHttpDriver.php b/src/DebugBar/PhpHttpDriver.php index af07060..36e56f8 100644 --- a/src/DebugBar/PhpHttpDriver.php +++ b/src/DebugBar/PhpHttpDriver.php @@ -15,6 +15,9 @@ namespace DebugBar; */ class PhpHttpDriver implements HttpDriverInterface { + /** + * @param array $headers + */ function setHeaders(array $headers) { foreach ($headers as $name => $value) { @@ -22,26 +25,44 @@ class PhpHttpDriver implements HttpDriverInterface } } + /** + * @return bool + */ function isSessionStarted() { return isset($_SESSION); } + /** + * @param string $name + * @param string $value + */ function setSessionValue($name, $value) { $_SESSION[$name] = $value; } + /** + * @param string $name + * @return bool + */ function hasSessionValue($name) { return array_key_exists($name, $_SESSION); } + /** + * @param string $name + * @return mixed + */ function getSessionValue($name) { return $_SESSION[$name]; } + /** + * @param string $name + */ function deleteSessionValue($name) { unset($_SESSION[$name]); diff --git a/src/DebugBar/RequestIdGenerator.php b/src/DebugBar/RequestIdGenerator.php index 934f407..21b3c0c 100644 --- a/src/DebugBar/RequestIdGenerator.php +++ b/src/DebugBar/RequestIdGenerator.php @@ -15,6 +15,9 @@ namespace DebugBar; */ class RequestIdGenerator implements RequestIdGeneratorInterface { + /** + * @return string + */ public function generate() { return md5(serialize($_SERVER) . microtime());