2020-04-12 17:41:01 +02:00
|
|
|
<?php
|
|
|
|
namespace Psalm\Tests\Internal\Provider;
|
|
|
|
|
|
|
|
class ProjectCacheProvider extends \Psalm\Internal\Provider\ProjectCacheProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
private $last_run = 0;
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasLockfileChanged() : bool
|
|
|
|
{
|
2020-04-12 18:02:19 +02:00
|
|
|
return false;
|
2020-04-12 17:41:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function updateComposerLockHash() : void
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|