Skip to content

Commit 8e55495

Browse files
committed
Move development mode check into ProjectGlobals
1 parent bee855c commit 8e55495

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/Framework/Build/BuildTools.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public static function parseClassHierarchy(string $baseDir): array
155155
public static function getLastModifiedTime(): int
156156
{
157157
/* in development mode we always assume that we've recently refreshed our data */
158-
if (isset($_ENV['DEVELOPMENT'])) {
158+
if (ProjectGlobals::isDevelopmentMode()) {
159159
return time();
160160
}
161161

src/ProjectGlobals.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@ public static function getPublicRoot(): string
2323
return realpath(__DIR__ . '/../public')
2424
?: throw new Error('Unable to locate public root');
2525
}
26+
27+
public static function isDevelopmentMode(): bool
28+
{
29+
return ($_ENV['DEVELOPMENT'] ?? '') === '1';
30+
}
2631
}

0 commit comments

Comments
 (0)