This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -47,7 +47,7 @@ class Inflectible
yield new Transformation(new Pattern('(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$'), '\1\2sis');
yield new Transformation(new Pattern('(tax)a$'), '\1on');
yield new Transformation(new Pattern('(c)riteria$'), '\1riterion');
yield new Transformation(new Pattern('([ti])a$'), '\1um');
yield new Transformation(new Pattern('([ti])a(?<!regatta)$'), '\1um');
yield new Transformation(new Pattern('(p)eople$'), '\1\2erson');
yield new Transformation(new Pattern('(m)en$'), '\1an');
yield new Transformation(new Pattern('(c)hildren$'), '\1\2hild');

View File

@@ -29,11 +29,11 @@
"php": "^8.1"
},
"require-dev": {
"doctrine/coding-standard": "^10",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"doctrine/coding-standard": "^12",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"psalm/plugin-phpunit": "^0.18.3",
"vimeo/psalm": "^5.0"
"vimeo/psalm": "^5.21"
},
"autoload": {
"psr-4": {

View File

@@ -49,21 +49,21 @@ abstract class AbstractLexer
/**
* The next token in the input.
*
* @var mixed[]|null
* @psalm-var Token<T, V>|null
* @var Token<T, V>|null
*/
public Token|null $lookahead;
/**
* The last matched/seen token.
*
* @var mixed[]|null
* @psalm-var Token<T, V>|null
* @var Token<T, V>|null
*/
public Token|null $token;
/**
* Composed regex for input parsing.
*
* @var non-empty-string|null
*/
private string|null $regex = null;
@@ -203,8 +203,7 @@ abstract class AbstractLexer
/**
* Moves the lookahead token forward.
*
* @return mixed[]|null The next token or NULL if there are no more tokens ahead.
* @psalm-return Token<T, V>|null
* @return Token<T, V>|null The next token or NULL if there are no more tokens ahead.
*/
public function peek()
{
@@ -218,8 +217,7 @@ abstract class AbstractLexer
/**
* Peeks at the next token, returns it and immediately resets the peek.
*
* @return mixed[]|null The next token or NULL if there are no more tokens ahead.
* @psalm-return Token<T, V>|null
* @return Token<T, V>|null The next token or NULL if there are no more tokens ahead.
*/
public function glimpse()
{