Skip to content

Commit ed235d9

Browse files
committed
Rename method to better intelligibility (->isDebug() to ->isDebugMode())
1 parent 66981d5 commit ed235d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/DebugModeDetector.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public function getEnabler(): DebugModeEnabler
2121
return $this->enabler;
2222
}
2323

24-
public function isDebug(): bool
24+
public function isDebugMode(): bool
2525
{
26-
return $this->isDebugByEnabler() ?? $this->isDebugByEnv() ?? $this->isDebugByIp() ?? false;
26+
return $this->isDebugModeByEnabler() ?? $this->isDebugModeByEnv() ?? $this->isDebugModeByIp() ?? false;
2727
}
2828

2929
/**
@@ -35,7 +35,7 @@ public function isDebug(): bool
3535
3636
* @return bool|null
3737
*/
38-
public function isDebugByEnabler(): ?bool
38+
public function isDebugModeByEnabler(): ?bool
3939
{
4040
return $this->enabler->isDebug();
4141
}
@@ -48,7 +48,7 @@ public function isDebugByEnabler(): ?bool
4848
* - undefined or any other value: null
4949
* @return bool|null
5050
*/
51-
public function isDebugByEnv(): ?bool
51+
public function isDebugModeByEnv(): ?bool
5252
{
5353
$envValue = getenv(self::DEBUG_ENV_NAME);
5454
if (is_numeric($envValue) && in_array((int)$envValue, [0, 1], true)) {
@@ -65,7 +65,7 @@ public function isDebugByEnv(): ?bool
6565
* - otherwise: null
6666
* @return bool|null
6767
*/
68-
public function isDebugByIp(): ?bool
68+
public function isDebugModeByIp(): ?bool
6969
{
7070
$addr = $_SERVER['REMOTE_ADDR'] ?? php_uname('n');
7171

0 commit comments

Comments
 (0)