ReplaceMultipleBooleanNotRector

Replace the Double not operator (!!) by type-casting to boolean

-$bool = !!$var;
+$bool = (bool) $var;

Configure your rector.php:

<?php

use Rector\CodeQuality\Rector\BooleanNot\ReplaceMultipleBooleanNotRector;
use Rector\Config\RectorConfig;

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