mirror of
https://github.com/danog/psalm.git
synced 2024-12-12 17:27:28 +01:00
26 lines
369 B
PHP
26 lines
369 B
PHP
<?php
|
|
declare(strict_types = 1);
|
|
|
|
namespace Psalm\Internal\LanguageServer;
|
|
|
|
/**
|
|
* Generates unique, incremental IDs for use as request IDs
|
|
*/
|
|
class IdGenerator
|
|
{
|
|
/**
|
|
* @var int
|
|
*/
|
|
public $counter = 1;
|
|
|
|
/**
|
|
* Returns a unique ID
|
|
*
|
|
* @return int
|
|
*/
|
|
public function generate()
|
|
{
|
|
return $this->counter++;
|
|
}
|
|
}
|