We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d54628d commit 83a7392Copy full SHA for 83a7392
src/Composer/ComposerOutdatedResponseProvider.php
@@ -10,6 +10,11 @@
10
11
final class ComposerOutdatedResponseProvider
12
{
13
+ /**
14
+ * @var int
15
+ */
16
+ private const WEEK_IN_SECONDS = 60 * 60 * 24 * 7;
17
+
18
public function provide(): string
19
20
$composerOutdatedFilePath = $this->resolveComposerOutdatedFilePath();
@@ -67,7 +72,7 @@ private function isFileYoungerThanWeek(string $filePath): bool
67
72
return false;
68
73
}
69
74
70
- return (time() - $fileTime) < DateTime::WEEK;
75
+ return (time() - $fileTime) < self::WEEK_IN_SECONDS;
71
76
77
78
private function shouldLoadCacheFile(?string $cacheFilePath): bool
0 commit comments