Skip to content

Commit ea3434e

Browse files
committed
Update fixture for __toString() when parent mixed return, to always add string, as work
1 parent a719629 commit ea3434e

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

rules-tests/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector/Fixture/skip_parent_mixed_return.php.inc

Lines changed: 0 additions & 13 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector\Fixture;
4+
5+
use Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector\Source\ParentClassWithToStringMixedReturn;
6+
7+
// @see https://3v4l.org/IrE2q#v7.4.33
8+
class WithParentMixedReturn extends ParentClassWithToStringMixedReturn
9+
{
10+
public function __toString()
11+
{
12+
return 'value';
13+
}
14+
}
15+
16+
?>
17+
-----
18+
<?php
19+
20+
namespace Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector\Fixture;
21+
22+
use Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector\Source\ParentClassWithToStringMixedReturn;
23+
24+
// @see https://3v4l.org/IrE2q#v7.4.33
25+
class WithParentMixedReturn extends ParentClassWithToStringMixedReturn
26+
{
27+
public function __toString(): string
28+
{
29+
return 'value';
30+
}
31+
}
32+
33+
?>

0 commit comments

Comments
 (0)