Skip to content

Commit a4fbd48

Browse files
committed
Detector: Rename detectProductionMode method
1 parent 93859cf commit a4fbd48

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.phpstorm.meta.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
);
3030

3131
expectedArguments(
32-
\Redbitcz\DebugMode\Detector::detectProductionMode(),
32+
\Redbitcz\DebugMode\Detector::detectProduction(),
3333
0,
3434
\Redbitcz\DebugMode\Detector::MODE_FULL,
3535
\Redbitcz\DebugMode\Detector::MODE_SIMPLE,

src/Detector.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public static function detect(
254254
* @param string|null $tempDir Path to temp directory. Optional, but required when Enabler mode is enabled
255255
* @param bool|null $default Default value when no method matches
256256
*/
257-
public static function detectProductionMode(
257+
public static function detectProduction(
258258
int $mode = self::MODE_SIMPLE,
259259
?string $tempDir = null,
260260
?bool $default = true
@@ -271,4 +271,16 @@ public static function detectProductionMode(
271271

272272
return $result;
273273
}
274+
275+
/**
276+
* @deprecated Use `detectProduction()`
277+
* @see self::detectProduction()
278+
*/
279+
public static function detectProductionMode(
280+
int $mode = self::MODE_SIMPLE,
281+
?string $tempDir = null,
282+
?bool $default = false
283+
): ?bool {
284+
return self::detectProduction($mode, $tempDir, $default);
285+
}
274286
}

0 commit comments

Comments
 (0)