Skip to content

Commit ee94b81

Browse files
authored
refactor(debug): correct dd() return type and simplify conditionals (#1766)
1 parent c5db557 commit ee94b81

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/debug/src/Debug.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ public function log(array $items, bool $writeToLog = true, bool $writeToOut = tr
5252

5353
private function writeToLog(array $items, string $callPath): void
5454
{
55-
if ($this->logConfig === null) {
56-
return;
57-
}
58-
59-
if (! $this->logConfig->debugLogPath) {
55+
if (! $this->logConfig?->debugLogPath) {
6056
return;
6157
}
6258

packages/debug/src/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function le(mixed ...$input): void
5656
* @see ld()
5757
* @see \Tempest\Debug\Debug::log()
5858
*/
59-
function dd(mixed ...$input): void
59+
function dd(mixed ...$input): never
6060
{
6161
ld(...$input);
6262
}

0 commit comments

Comments
 (0)