Skip to content

Commit a0506ec

Browse files
aarondfrancisclaude
andcommitted
Fix potential null return in getEnvironment() under strict types
Added 'production' as a safe default fallback when neither sidecar.env nor app.env are configured, ensuring the string return type is satisfied. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fa80caa commit a0506ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Concerns/ManagesEnvironments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public function clearEnvironment(): void
2424

2525
public function getEnvironment(): string
2626
{
27-
return $this->environment ?? config('sidecar.env') ?? config('app.env');
27+
return $this->environment ?? config('sidecar.env') ?? config('app.env', 'production');
2828
}
2929
}

0 commit comments

Comments
 (0)