Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions config/set/php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

use PhpParser\Node\Expr\Cast\Double;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\ArrayDimFetch\CurlyToSquareBracketArrayStringRector;
use Rector\Php74\Rector\Assign\NullCoalescingOperatorRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php74\Rector\Double\RealToFloatTypeCastRector;
use Rector\Php74\Rector\FuncCall\ArrayKeyExistsOnPropertyRector;
use Rector\Php74\Rector\FuncCall\FilterVarToAddSlashesRector;
use Rector\Php74\Rector\FuncCall\HebrevcToNl2brHebrevRector;
Expand All @@ -16,7 +16,9 @@
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector;
use Rector\Php74\Rector\Ternary\ParenthesizeNestedTernaryRector;
use Rector\Renaming\Rector\Cast\RenameCastRector;
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
use Rector\Renaming\ValueObject\RenameCast;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig
Expand All @@ -31,7 +33,6 @@
FilterVarToAddSlashesRector::class,
ExportToReflectionFunctionRector::class,
MbStrrposEncodingArgumentPositionRector::class,
RealToFloatTypeCastRector::class,
NullCoalescingOperatorRector::class,
ClosureToArrowFunctionRector::class,
RestoreDefaultNullToNullableTypePropertyRector::class,
Expand All @@ -41,4 +42,9 @@
RestoreIncludePathToIniRestoreRector::class,
HebrevcToNl2brHebrevRector::class,
]);

$rectorConfig->ruleWithConfiguration(
RenameCastRector::class,
[new RenameCast(Double::class, Double::KIND_REAL, Double::KIND_FLOAT)]
);
};
6 changes: 6 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,9 @@ parameters:
-
identifier: arrayValues.list
path: rules/CodingStyle/Application/UseImportsAdder.php

-
message: '#^Register "Rector\\Php74\\Rector\\Double\\RealToFloatTypeCastRector" service to "php74\.php" config set$#'
identifier: rector.upgradeDowngradeRegisteredInSet
count: 1
path: rules/Php74/Rector/Double/RealToFloatTypeCastRector.php
Loading