new files

This commit is contained in:
panchengyong
2026-03-07 22:29:07 +08:00
parent cd7e80b502
commit 7acbf45ff7
12516 changed files with 1808447 additions and 194 deletions

View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Common\Lexer;
use Doctrine\Common\Lexer\AbstractLexer;
/** @extends AbstractLexer<int, string> */
class MutableLexer extends AbstractLexer
{
/** @var string[] */
private $catchablePatterns = [];
public function addCatchablePattern(string $pattern): void
{
$this->catchablePatterns[] = $pattern;
}
/**
* {@inheritDoc}
*/
protected function getCatchablePatterns(): array
{
return $this->catchablePatterns;
}
/**
* {@inheritDoc}
*/
protected function getNonCatchablePatterns(): array
{
return ['[\s,]+'];
}
/**
* {@inheritDoc}
*/
protected function getType(&$value): int
{
return 1;
}
}