1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 17:27:28 +01:00
psalm/src/Psalm/Internal/LanguageServer/IdGenerator.php
2018-11-12 11:20:59 -05:00

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++;
}
}