diff --git a/rules/Php84/Rector/FuncCall/AddEscapeArgumentRector.php b/rules/Php84/Rector/FuncCall/AddEscapeArgumentRector.php index 8cb09a2233f..353cfbbd77c 100644 --- a/rules/Php84/Rector/FuncCall/AddEscapeArgumentRector.php +++ b/rules/Php84/Rector/FuncCall/AddEscapeArgumentRector.php @@ -3,13 +3,13 @@ declare (strict_types=1); namespace Rector\Php84\Rector\FuncCall; -use PHPStan\Type\ObjectType; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Identifier; use PhpParser\Node\Scalar\String_; +use PHPStan\Type\ObjectType; use Rector\Rector\AbstractRector; use Rector\ValueObject\PhpVersionFeature; use Rector\VersionBonding\Contract\MinPhpVersionInterface; @@ -57,7 +57,7 @@ CODE_SAMPLE if ($name === 'str_getcsv' && isset($node->getArgs()[3])) { return null; } - $node->args[\count($node->getArgs())] = new Arg(new String_("\\"), \false, \false, [], new Identifier('escape')); + $node->args[\count($node->getArgs())] = new Arg(new String_('\\'), \false, \false, [], new Identifier('escape')); return $node; } if (!$this->isObjectType($node->var, new ObjectType('SplFileObject'))) { @@ -76,9 +76,13 @@ CODE_SAMPLE if ($name === 'fputcsv' && isset($node->getArgs()[3])) { return null; } - $node->args[\count($node->getArgs())] = new Arg(new String_("\\"), \false, \false, [], new Identifier('escape')); + $node->args[\count($node->getArgs())] = new Arg(new String_('\\'), \false, \false, [], new Identifier('escape')); return $node; } + public function provideMinPhpVersion() : int + { + return PhpVersionFeature::REQUIRED_ESCAPE_PARAMETER; + } /** * @param \PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Expr\MethodCall $node */ @@ -92,8 +96,4 @@ CODE_SAMPLE } return \false; } - public function provideMinPhpVersion() : int - { - return PhpVersionFeature::REQUIRED_ESCAPE_PARAMETER; - } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index b73472792c8..76a9266bf5d 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'b96adc590b9939e14a2abfdda3dd05f5bb1824e1'; + public const PACKAGE_VERSION = 'd1e896cd58204f76a1dea43a86e8f119a8c71c9c'; /** * @api * @var string */ - public const RELEASE_DATE = '2025-03-15 12:24:23'; + public const RELEASE_DATE = '2025-03-16 00:36:29'; /** * @var int */