AssertEmptyNullableObjectToAssertInstanceofRector

Change assertNotEmpty() on an object to more clear assertInstanceof()

 use PHPUnit\Framework\TestCase;

 class SomeClass extends TestCase
 {
     public function test()
     {
         $someObject = new stdClass();

-        $this->assertNotEmpty($someObject);
+        $this->assertInstanceof(stdClass::class, $someObject);
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertEmptyNullableObjectToAssertInstanceofRector;

return RectorConfig::configure()
    ->withRules([
        AssertEmptyNullableObjectToAssertInstanceofRector::class,
    ]);
SETS:  Code Quality