Skip to content

Commit 4cf5c57

Browse files
committed
fixup! add support for boolean vs constant boolean type
1 parent 9598ed8 commit 4cf5c57

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
namespace Rector\Tests\CodeQuality\Rector\Equal\UseIdenticalOverEqualWithSameTypeRector\Fixture;
4+
5+
final class IdenticalString
6+
{
7+
public function equal()
8+
{
9+
if ($this->getValue() == 'hi') {
10+
return 'yes';
11+
}
12+
13+
return 'no';
14+
}
15+
16+
private function getValue(): string
17+
{
18+
return 'hello';
19+
}
20+
}
21+
22+
?>
23+
-----
24+
<?php
25+
26+
namespace Rector\Tests\CodeQuality\Rector\Equal\UseIdenticalOverEqualWithSameTypeRector\Fixture;
27+
28+
final class IdenticalString
29+
{
30+
public function equal()
31+
{
32+
if ($this->getValue() === 'hi') {
33+
return 'yes';
34+
}
35+
36+
return 'no';
37+
}
38+
39+
private function getValue(): string
40+
{
41+
return 'hello';
42+
}
43+
}
44+
45+
?>

0 commit comments

Comments
 (0)