Skip to content

Commit 7d950af

Browse files
committed
Add $default parameter for main detect() method
1 parent cb4a4c9 commit 7d950af

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Detector.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public function getEnabler(): Enabler
2525
return $this->enabler;
2626
}
2727

28-
public function isDebugMode(): bool
28+
public function isDebugMode(?bool $default = false): bool
2929
{
3030
return $this->isDebugModeByEnabler()
3131
?? $this->isDebugModeByEnv()
3232
?? $this->isDebugModeByIp()
33-
?? false;
33+
?? $default;
3434
}
3535

3636
/**
@@ -86,8 +86,8 @@ public function isDebugModeByIp(): ?bool
8686
return $result ?: null;
8787
}
8888

89-
public static function detect(string $tempDir): bool
89+
public static function detect(string $tempDir, ?bool $default = false): bool
9090
{
91-
return (new self($tempDir))->isDebugMode();
91+
return (new self($tempDir))->isDebugMode($default);
9292
}
93-
}
93+
}

0 commit comments

Comments
 (0)