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-09-04 22:26:33 +02:00
|
|
|
public function getLastRun(): int
|
2020-04-12 17:41:01 +02:00
|
|
|
{
|
|
|
|
return $this->last_run;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return void
|
|
|
|
*/
|
2020-09-07 01:36:47 +02:00
|
|
|
public function processSuccessfulRun(float $start_time)
|
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
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|