Skip to content

Commit

Permalink
go home ondrej you are drunk
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed May 13, 2023
1 parent a338acb commit 772b561
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Message.php
Expand Up @@ -57,8 +57,12 @@ public function __construct(
$this->backtrace = debug_backtrace();
}
$this->writer = new NullWriter();
$this->filePath = strval($this->backtrace[0]['file'] ?? '');
$this->fileLine = intval($this->backtrace[0]['line'] ?? 0);
/** @var string $file */
$file = $this->backtrace[0]['file'] ?? '';
/** @var int $line */
$line = $this->backtrace[0]['line'] ?? 0;
$this->filePath = strval($file);
$this->fileLine = intval($line);
$node = (new RandomNodeProvider())->getNode();
$this->id = Uuid::uuid1($node)->__toString();
}
Expand Down
1 change: 1 addition & 0 deletions src/functions.php
Expand Up @@ -160,6 +160,7 @@ function xr(mixed ...$vars): void
't' => '',
'f' => 0,
];
/** @var array<string|int, string> */
$args = array_merge($defaultArgs, $vars);
foreach (array_keys($defaultArgs) as $name) {
if (array_key_exists($name, $vars)) {
Expand Down

0 comments on commit 772b561

Please sign in to comment.