Skip to content

Commit

Permalink
remove ArrayDimFetch feature
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jul 26, 2023
1 parent 168af31 commit d4a8040
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private function refactorBooleanNot(BooleanNot $booleanNot, Scope $scope): Expr|

$empty = $booleanNot->expr;
if ($empty->expr instanceof ArrayDimFetch) {
return $this->createDimFetchBooleanAnd($empty);
return null;
}

if ($this->exprAnalyzer->isNonTypedFromParam($empty->expr)) {
Expand Down
22 changes: 0 additions & 22 deletions tests/Issues/EmptyBooleanCompare/Fixture/fixture.php.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,3 @@ final class SomeFixture
return null;
}
}

?>
-----
<?php

namespace Rector\Core\Tests\Issues\EmptyBooleanCompare\Fixture;

final class SomeFixture
{
public function checkUrl(string $url)
{
$parts = parse_url($url);

if (isset($parts['host']) && $parts['host'] !== '') {
return $parts['host'];
}

return null;
}
}

?>

0 comments on commit d4a8040

Please sign in to comment.