2020-04-12 11:41:01 -04:00
|
|
|
<?php
|
2021-12-15 04:58:32 +01:00
|
|
|
|
2020-04-12 11:41:01 -04:00
|
|
|
namespace Psalm\Tests\Internal\Provider;
|
|
|
|
|
2021-12-03 22:44:41 +01:00
|
|
|
use Psalm\Internal\Provider\ProjectCacheProvider as PsalmProjectCacheProvider;
|
|
|
|
|
|
|
|
class ProjectCacheProvider extends PsalmProjectCacheProvider
|
2020-04-12 11:41:01 -04:00
|
|
|
{
|
2022-12-16 12:58:47 -06:00
|
|
|
private int $last_run = 0;
|
2020-04-12 11:41:01 -04:00
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-11-01 09:01:43 -05:00
|
|
|
public function getLastRun(string $psalm_version): int
|
2020-04-12 11:41:01 -04:00
|
|
|
{
|
|
|
|
return $this->last_run;
|
|
|
|
}
|
|
|
|
|
2020-11-01 09:01:43 -05:00
|
|
|
public function processSuccessfulRun(float $start_time, string $psalm_version): void
|
2020-04-12 11:41:01 -04:00
|
|
|
{
|
|
|
|
$this->last_run = (int) $start_time;
|
|
|
|
}
|
|
|
|
|
2020-09-04 22:26:33 +02:00
|
|
|
public function canDiffFiles(): bool
|
2020-04-12 11:41:01 -04:00
|
|
|
{
|
|
|
|
return $this->last_run > 0;
|
|
|
|
}
|
|
|
|
|
2021-12-05 18:51:26 +01:00
|
|
|
public function hasLockfileChanged(): bool
|
2020-04-12 11:41:01 -04:00
|
|
|
{
|
2020-04-12 12:02:19 -04:00
|
|
|
return false;
|
2020-04-12 11:41:01 -04:00
|
|
|
}
|
|
|
|
|
2021-12-05 18:51:26 +01:00
|
|
|
public function updateComposerLockHash(): void
|
2020-04-12 11:41:01 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|