Skip to content

Commit

Permalink
change: from mixed to int
Browse files Browse the repository at this point in the history
  • Loading branch information
AzaleeX committed Oct 28, 2024
1 parent e277041 commit 7bd8122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function VERSION() : VersionString{
return self::$fullVersion;
}

//I don't know if it would really work
//I don't know if it would really work
public static function BUILD_DATE() : int {
static $buildDate = null;
if ($buildDate === null) {
Expand All @@ -115,7 +115,7 @@ public static function BUILD_DATE() : int {
$phar = \Phar::isValidPharFilename($pharPath) ? new \Phar($pharPath) : new \PharData($pharPath);
$meta = $phar->getMetadata();
if (isset($meta["date"])) {

Check failure on line 117 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 117 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 117 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"];
$buildDate = (int) $meta["date"];

Check failure on line 118 in src/VersionInfo.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 / PHPStan analysis

Cannot cast mixed to int.

Check failure on line 118 in src/VersionInfo.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 / PHPStan analysis

Cannot cast mixed to int.

Check failure on line 118 in src/VersionInfo.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 / PHPStan analysis

Cannot cast mixed to int.
}
}
}
Expand Down

0 comments on commit 7bd8122

Please sign in to comment.