AndAssignsToSeparateLinesRector

Split 2 assigns ands to separate line

 class SomeClass
 {
     public function run()
     {
         $tokens = [];
-        $token = 4 and $tokens[] = $token;
+        $token = 4;
+        $tokens[] = $token;
     }
 }

Configure your rector.php:

<?php

use Rector\CodeQuality\Rector\LogicalAnd\AndAssignsToSeparateLinesRector;
use Rector\Config\RectorConfig;

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