RemoveAssertNotNullOnCollectionRector

Remove RectorPrefix202508\PHPUnit\Framework\Assert::assertNotNull() on a Collection type

 use Doctrine\Common\Collections\Collection;

 class SomeClass
 {
     public function run(Collection $collection): void
     {
-        Assert::assertNotNull($collection);
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Doctrine\TypedCollections\Rector\Expression\RemoveAssertNotNullOnCollectionRector;

return RectorConfig::configure()
    ->withRules([
        RemoveAssertNotNullOnCollectionRector::class,
    ]);