Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e18562

Browse files
committed
add FunctionFirstClassCallableRector to PHP 8.1 set
1 parent 153fc78 commit 0e18562

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

config/set/php81.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare(strict_types=1);
44

55
use Rector\CodingStyle\Rector\FuncCall\ClosureFromCallableToFirstClassCallableRector;
6+
use Rector\CodingStyle\Rector\FuncCall\FunctionFirstClassCallableRector;
67
use Rector\CodingStyle\Rector\FunctionLike\FunctionLikeToFirstClassCallableRector;
78
use Rector\Config\RectorConfig;
89
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
@@ -34,6 +35,7 @@
3435
// closure/arrow function
3536
FunctionLikeToFirstClassCallableRector::class,
3637
ClosureFromCallableToFirstClassCallableRector::class,
38+
FunctionFirstClassCallableRector::class,
3739
RemoveReflectionSetAccessibleCallsRector::class,
3840

3941
NewInInitializerRector::class,

src/PhpParser/Printer/BetterStandardPrinter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ private function wrapAssign(Node $leftNode, Node $rightNode): void
501501
private function cleanStartIndentationOnHeredocNowDoc(string $content): string
502502
{
503503
$lines = NewLineSplitter::split($content);
504-
$trimmedLines = array_map('ltrim', $lines);
504+
$trimmedLines = array_map(ltrim(...), $lines);
505505

506506
return implode("\n", $trimmedLines);
507507
}

0 commit comments

Comments
 (0)