2020-04-12 17:41:01 +02:00
|
|
|
<?php
|
2021-12-15 04:58:32 +01:00
|
|
|
|
2020-04-12 17:41:01 +02: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 17:41:01 +02:00
|
|
|
{
|
2022-12-16 19:58:47 +01:00
|
|
|
private int $last_run = 0;
|
2020-04-12 17:41:01 +02:00
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-11-01 15:01:43 +01:00
|
|
|
public function getLastRun(string $psalm_version): int
|
2020-04-12 17:41:01 +02:00
|
|
|
{
|
|
|
|
return $this->last_run;
|
|
|
|
}
|
|
|
|
|
2020-11-01 15:01:43 +01:00
|
|
|
public function processSuccessfulRun(float $start_time, string $psalm_version): void
|
2020-04-12 17:41:01 +02:00
|
|
|
{
|
|
|
|
$this->last_run = (int) $start_time;
|
|
|
|
}
|
|
|
|
|
2020-09-04 22:26:33 +02:00
|
|
|
public function canDiffFiles(): bool
|
2020-04-12 17:41:01 +02:00
|
|
|
{
|
|
|
|
return $this->last_run > 0;
|
|
|
|
}
|
|
|
|
|
2021-12-05 18:51:26 +01:00
|
|
|
public function hasLockfileChanged(): bool
|
2020-04-12 17:41:01 +02:00
|
|
|
{
|
2020-04-12 18:02:19 +02:00
|
|
|
return false;
|
2020-04-12 17:41:01 +02:00
|
|
|
}
|
|
|
|
|
2021-12-05 18:51:26 +01:00
|
|
|
public function updateComposerLockHash(): void
|
2020-04-12 17:41:01 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|