src/CodeGeneration/Generator/FileCreationTransaction.php
public static function echoDirtyTransactionCleanupCommands($handle = STDERR): void
    {
        if (0 === count(self::$pathsCreated)) {
            return;
        }
        $sinceTimeSeconds = ceil(microtime(true) - self::$startTime);
        // why, because of xdebug break - you could easily spend over 1 minute stepping through
        $sinceTimeMinutes = ceil($sinceTimeSeconds / 60);
        $pathsToSearch    = [];
        foreach (self::$pathsCreated as $path) {
            $realPath = realpath($path);
            if ($realPath) {
                $pathsToSearch[$realPath] = $realPath;
            }
        }
        if (0 === count($pathsToSearch)) {
            return;
        }
        $findCommand   = 'find ' . implode(' ', $pathsToSearch) . "  -mmin -$sinceTimeMinutes";
        $line          = str_repeat('-', 15);
        $deleteCommand = "$findCommand -exec rm -rf";
        fwrite(
            $handle,
            "\n$line\n"
            . "\n\nUnclean File Creation Transaction:"
            . "\n\nTo find created files:\n$findCommand"
            . "\n\nTo remove created files:\n$deleteCommand"
            . "\n\n$line\n\n"
        );
    }
public static function echoDirtyTransactionCleanupCommands($handle = STDERR): void
    {
        if (0 === count(self::$pathsCreated)) {
            return;
        }
        $sinceTimeSeconds = ceil(microtime(true) - self::$startTime);
        // why, because of xdebug break - you could easily spend over 1 minute stepping through
        $sinceTimeMinutes = ceil($sinceTimeSeconds / 60);
        $pathsToSearch    = [];
        foreach (self::$pathsCreated as $path) {
            $realPath = realpath($path);
            if ($realPath) {
                $pathsToSearch[$realPath] = $realPath;
            }
        }
        if (0 === count($pathsToSearch)) {
            return;
        }
        $findCommand   = 'find ' . implode(' ', $pathsToSearch) . "  -mmin -$sinceTimeMinutes";
        $line          = str_repeat('-', 15);
        $deleteCommand = "$findCommand -exec rm -rf";
        fwrite(
            $handle,
            "\n$line\n"
            . "\n\nUnclean File Creation Transaction:"
            . "\n\nTo find created files:\n$findCommand"
            . "\n\nTo remove created files:\n$deleteCommand"
            . "\n\n$line\n\n"
        );
    }
public static function echoDirtyTransactionCleanupCommands ( $ handle = STDERR ) : void { if ( 0 === count ( self :: $ pathsCreated ) ) { return ; } $ sinceTimeSeconds = ceil ( microtime ( true ) - self :: $ startTime ) ; // why, because of xdebug break - you could easily spend over 1 minute stepping through $ sinceTimeMinutes = ceil ( $ sinceTimeSeconds / 60 ) ; $ pathsToSearch = [ ] ; foreach ( self :: $ pathsCreated as $ path ) { $ realPath = realpath ( $ path ) ; if ( $ realPath ) { $ pathsToSearch [ $ realPath ] = $ realPath ; } } if ( 0 === count ( $ pathsToSearch ) ) { return ; } $ findCommand = 'find ' . implode ( ' ' , $ pathsToSearch ) . "  -mmin -$sinceTimeMinutes" ; $ line = str_repeat ( '-' , 15 ) ; $ deleteCommand = "$findCommand -exec rm -rf" ; fwrite ( $ handle , "\n$line\n" . "\n\nUnclean File Creation Transaction:" . "\n\nTo find created files:\n$findCommand" . "\n\nTo remove created files:\n$deleteCommand" . "\n\n$line\n\n" ) ; }
Echos out bash find commands to find and delete created paths

@param bool|resource $handle
Echos out bash find commands to find and delete created paths