Skip to content

Commit b15dcfe

Browse files
committed
[DeadCode] Handle only remove 1 @var on multi vars on RemoveUselessVarTagRector
1 parent e65ac69 commit b15dcfe

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace Rector\Tests\DeadCode\Rector\Property\RemoveUselessVarTagRector\Fixture;
4+
5+
class MyClxProductNet_Translate {
6+
/**
7+
* @phpstan-pure
8+
*/
9+
public static function create(): self
10+
{
11+
return new self();
12+
}
13+
}
14+
15+
/** @var MyActionController $this */
16+
/** @var MyClxProductNet_Translate $translator */
17+
$translator = MyClxProductNet_Translate::create();
18+
$url = $this->bulkConsumerRegistration ?? "abc";
19+
20+
?>
21+
-----
22+
<?php
23+
24+
namespace Rector\Tests\DeadCode\Rector\Property\RemoveUselessVarTagRector\Fixture;
25+
26+
class MyClxProductNet_Translate {
27+
/**
28+
* @phpstan-pure
29+
*/
30+
public static function create(): self
31+
{
32+
return new self();
33+
}
34+
}
35+
36+
/** @var MyActionController $this */
37+
$translator = MyClxProductNet_Translate::create();
38+
$url = $this->bulkConsumerRegistration ?? "abc";
39+
40+
?>

0 commit comments

Comments
 (0)