-
-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
rectorphp/rector-src
#6054Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/5c08c3f0-8d7f-4b44-93e7-732a963c4df8
<?php
declare(strict_types=1);
namespace Rector\Tests\Php81\Rector\Property\ReadOnlyPropertyRector\Fixture;
use PDO;
class A
{
public function __construct(
private int $id
) {
}
public function prepare(): void
{
$dsn = 'mysql:dbname=testdb;host=127.0.0.1';
$user = 'dbuser';
$password = 'dbpass';
$dbh = new PDO($dsn, $user, $password);
$sth = $dbh->prepare('SELECT * FROM users WHERE id = :id');
$sth->bindParam('id', $this->id, PDO::PARAM_INT);
$sth->execute();
}
}
Expected Behaviour
Property should not be changed as it's passed by reference in the bindParam method call
Reactions are currently unavailable