This commit is contained in:
TomasVotruba 2020-01-12 23:26:52 +01:00
parent 1b6f616cf9
commit 6b6350d2bc
2 changed files with 31 additions and 8 deletions

View File

@ -9,10 +9,6 @@ final class Numbers
if (!$item) { if (!$item) {
return 'empty'; return 'empty';
} }
if ($item) {
return 'not empty';
}
} }
public function go(float $item) public function go(float $item)
@ -40,10 +36,6 @@ final class Numbers
if ($item === 0) { if ($item === 0) {
return 'empty'; return 'empty';
} }
if ($item !== 0) {
return 'not empty';
}
} }
public function go(float $item) public function go(float $item)

View File

@ -0,0 +1,31 @@
<?php
namespace Rector\CodeQuality\Tests\Rector\If_\ExplicitBoolCompareRector\Fixture;
final class PhpStan0126Break
{
public function run(int $item)
{
if ($item) {
return 'not empty';
}
}
}
?>
-----
<?php
namespace Rector\CodeQuality\Tests\Rector\If_\ExplicitBoolCompareRector\Fixture;
final class PhpStan0126Break
{
public function run(int $item)
{
if ($item !== 0) {
return 'not empty';
}
}
}
?>