[PHP 8.0] Skip accessed variable before property assign (#5008)

Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
This commit is contained in:
Tomas Votruba 2020-12-27 03:07:52 +01:00 committed by GitHub
parent f49c14618a
commit 8de8cddaf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,13 @@
<?php
namespace Rector\Php80\Tests\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector\Fixture;
class SkipAccessedVariableBeforeAssign
{
public $x;
function __construct(string $x) {
$x = 'preprended-' . $x;
$this->x = $x;
}
}