new files
This commit is contained in:
43
pro_v3.5.1/vendor/doctrine/lexer/tests/MutableLexer.php
vendored
Normal file
43
pro_v3.5.1/vendor/doctrine/lexer/tests/MutableLexer.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user