Skip to content

Commit 0cac71a

Browse files
authored
[CodeQuality] Add fixture test for skip nullable array from property with default value (#6417)
1 parent 3949fc2 commit 0cac71a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace Rector\Tests\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector\Fixture;
4+
5+
final class SkipNullable
6+
{
7+
/** @var array */
8+
public $property = [];
9+
10+
public function run()
11+
{
12+
$this->property = null;
13+
}
14+
15+
public function isEmpty(): bool
16+
{
17+
return empty($this->property);
18+
}
19+
}

0 commit comments

Comments
 (0)