Skip to content

Commit 2ca187c

Browse files
committed
[CodingStyle] Skip by ref params on BinaryOpStandaloneAssignsToDirectRector
1 parent 5697100 commit 2ca187c

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Rector\Tests\CodingStyle\Rector\ClassMethod\BinaryOpStandaloneAssignsToDirectRector\Fixture;
4+
5+
final class SkipByRefFromParamVariable
6+
{
7+
public function run(&$first, &$second)
8+
{
9+
$first = 100;
10+
$second = 200;
11+
12+
return $first <=> $second;
13+
}
14+
}

rules/CodingStyle/Rector/ClassMethod/BinaryOpStandaloneAssignsToDirectRector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use PhpParser\Node\Expr\CallLike;
1111
use PhpParser\Node\Expr\Closure;
1212
use PhpParser\Node\Expr\Variable;
13+
use PhpParser\Node\Param;
1314
use PhpParser\Node\Stmt;
1415
use PhpParser\Node\Stmt\ClassMethod;
1516
use PhpParser\Node\Stmt\Expression;

0 commit comments

Comments
 (0)