Updated Rector to commit e1b032ef92c901037728b9bacb838b75d4908413

e1b032ef92 [Php81] Skip with next required on NewInInitializerRector (#6599)
This commit is contained in:
Tomas Votruba 2024-12-17 21:57:29 +00:00
parent 22cf34f61c
commit 35244f0eda
4 changed files with 21 additions and 8 deletions

View File

@ -4,6 +4,7 @@ declare (strict_types=1);
namespace Rector\Php81\Rector\ClassMethod;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\Coalesce;
use PhpParser\Node\NullableType;
use PhpParser\Node\Param;
@ -178,6 +179,18 @@ CODE_SAMPLE
if ($classMethod->stmts === null || $classMethod->stmts === []) {
return [];
}
return \array_filter($classMethod->params, static fn(Param $param): bool => $param->type instanceof NullableType);
$params = \array_filter($classMethod->params, static fn(Param $param): bool => $param->type instanceof NullableType);
if ($params === []) {
return $params;
}
$totalParams = \count($classMethod->params);
foreach (\array_keys($params) as $key) {
for ($iteration = $key + 1; $iteration < $totalParams; ++$iteration) {
if (isset($classMethod->params[$iteration]) && !$classMethod->params[$iteration]->default instanceof Expr) {
return [];
}
}
}
return $params;
}
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '0efbe133dbbeb1f4d9335680bfb54f391f9533d1';
public const PACKAGE_VERSION = 'e1b032ef92c901037728b9bacb838b75d4908413';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-12-17 18:56:04';
public const RELEASE_DATE = '2024-12-18 04:54:46';
/**
* @var int
*/

View File

@ -512,8 +512,8 @@
},
{
"name": "illuminate\/container",
"version": "v11.35.1",
"version_normalized": "11.35.1.0",
"version": "v11.36.0",
"version_normalized": "11.36.0.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/container.git",
@ -569,8 +569,8 @@
},
{
"name": "illuminate\/contracts",
"version": "v11.35.1",
"version_normalized": "11.35.1.0",
"version": "v11.36.0",
"version_normalized": "11.36.0.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/contracts.git",

File diff suppressed because one or more lines are too long