Skip to content

Commit

Permalink
Release 1.0.0 test
Browse files Browse the repository at this point in the history
  • Loading branch information
AzaleeX committed Oct 28, 2024
1 parent aae78bd commit feb90bf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ public static function VERSION() : VersionString{
}

public static function BUILD_DATE() : int {
return time();
static $buildDate = null;
if ($buildDate === null) {
$buildDate = time();
if (\Phar::running(true) !== "") {
$pharPath = \Phar::running(false);
$phar = \Phar::isValidPharFilename($pharPath) ? new \Phar($pharPath) : new \PharData($pharPath);
$meta = $phar->getMetadata();
if (isset($meta["date"])) {

Check failure on line 116 in src/VersionInfo.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 / PHPStan analysis

Cannot access offset 'date' on mixed.

Check failure on line 116 in src/VersionInfo.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 / PHPStan analysis

Cannot access offset 'date' on mixed.

Check failure on line 116 in src/VersionInfo.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 / PHPStan analysis

Cannot access offset 'date' on mixed.
$buildDate = $meta["date"];
}
}
}
return $buildDate;
}
}

0 comments on commit feb90bf

Please sign in to comment.