1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 10:57:08 +01:00
psalm/src/Psalm/Internal/LanguageServer/IdGenerator.php
orklah f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00

24 lines
354 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
*
*/
public function generate(): int
{
return $this->counter++;
}
}