Updated Rector to commit 287deb27d125f599680faab4fec715dad4e61feb

287deb27d1 [PHPStan] Clean up ignore errors (#5634)
This commit is contained in:
Tomas Votruba 2024-02-18 15:45:54 +00:00
parent b3c461facb
commit 6c843cb4e4
3 changed files with 13 additions and 7 deletions

View File

@ -1,7 +1,10 @@
<?php
declare (strict_types=1);
namespace Rector\Transform\Rector\ConstFetch;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node;
use Rector\Contract\Rector\ConfigurableRectorInterface;
use Rector\Rector\AbstractRector;
@ -24,9 +27,9 @@ final class ConstFetchToClassConstFetchRector extends AbstractRector implements
}
public function getNodeTypes() : array
{
return [Node\Expr\ConstFetch::class];
return [ConstFetch::class];
}
public function refactor(Node $node)
public function refactor(Node $node) : ?ClassConstFetch
{
foreach ($this->constFetchToClassConsts as $constFetchToClassConst) {
if (!$this->isName($node, $constFetchToClassConst->getOldConstName())) {

View File

@ -7,14 +7,17 @@ use Rector\Validation\RectorAssert;
final class ConstFetchToClassConstFetch
{
/**
* @readonly
* @var string
*/
private $oldConstName;
/**
* @readonly
* @var string
*/
private $newClassName;
/**
* @readonly
* @var string
*/
private $newConstName;
@ -23,9 +26,9 @@ final class ConstFetchToClassConstFetch
$this->oldConstName = $oldConstName;
$this->newClassName = $newClassName;
$this->newConstName = $newConstName;
RectorAssert::constantName($oldConstName);
RectorAssert::className($newClassName);
RectorAssert::constantName($newConstName);
RectorAssert::constantName($this->oldConstName);
RectorAssert::className($this->newClassName);
RectorAssert::constantName($this->newConstName);
}
public function getOldConstName() : string
{

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'a8d0dbeb7191d57af0ac9068adf644730f728c83';
public const PACKAGE_VERSION = '287deb27d125f599680faab4fec715dad4e61feb';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-02-18 10:09:06';
public const RELEASE_DATE = '2024-02-18 22:43:42';
/**
* @var int
*/