Skip to content

Commit

Permalink
more fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 1, 2024
1 parent 961c77b commit 87130cf
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Rector\Tests\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector\Fixture;

final class ShortCircuit4
{
public function run(bool $param)
{
return $this->clock?->now->format('U.u');
}
}

?>
-----
<?php

namespace Rector\Tests\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector\Fixture;

final class ShortCircuit4
{
public function run(bool $param)
{
return ($nullsafeVariable1 = $this->clock) ? $nullsafeVariable1->now->format('U.u') : null;
}
}

?>

0 comments on commit 87130cf

Please sign in to comment.