mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 12:14:02 +01:00
Add test case for skipping $this in AddDefaultValueForUndefinedVariableRector
This commit is contained in:
parent
3fcf2c106c
commit
9563e6c3a8
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Php56\Tests\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector\Fixture;
|
||||
|
||||
class SkipThisAssign
|
||||
{
|
||||
private $val = 2;
|
||||
}
|
||||
|
||||
$fn = function() {
|
||||
return $this->val;
|
||||
};
|
||||
|
||||
$closure = Closure::bind($fn, new SkipThisAssign(), 'SkipThisAssign');
|
||||
echo $closure(), "\n";
|
Loading…
x
Reference in New Issue
Block a user