Skip to content

Commit

Permalink
TextRenderer: Add timestamp option to footer
Browse files Browse the repository at this point in the history
  • Loading branch information
jnvsor committed Nov 12, 2023
1 parent ae659e0 commit 1a2b76b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Binary file modified build/kint.phar
Binary file not shown.
14 changes: 14 additions & 0 deletions src/Renderer/TextRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ class TextRenderer extends AbstractRenderer
*/
public static $sort = self::SORT_NONE;

/**
* Timestamp to print in footer in date() format.
*
* @var false|string
*/
public static $timestamp = false;

public $header_width = 80;
public $indent_width = 4;

Expand Down Expand Up @@ -353,6 +360,13 @@ protected function calledFrom(): string
$output .= $this->call_info['callee']['function'].'()]';
}

if (false !== self::$timestamp) {
if (\strlen($output)) {
$output .= ' ';
}
$output .= \date(self::$timestamp);
}

return $output;
}

Expand Down

0 comments on commit 1a2b76b

Please sign in to comment.