Skip to content

Commit

Permalink
[Php71] Skip with If always array on CountOnNullRector
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 14, 2021
1 parent 82de366 commit 096b60f
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Rector\Tests\Php71\Rector\FuncCall\CountOnNullRector\Fixture;

final class SkipWithIfAlwaysArray
{
public function run($a, $b)
{
$data = [];
if (! $a) {
$data[] = $b;
}

$data[] = count($data) !== 0 ? 'a' : 'b';
}
}

0 comments on commit 096b60f

Please sign in to comment.