protected function cleanDirsTask($worker, AbstractAuth $auth, $remote)
    {
        $cleandirLimit = isset($remote['cleandir_limit']) ? max(1, $remote['cleandir_limit']) : '';

        $task = $this->taskSsh($worker, $auth)
            ->remoteDirectory($remote['rootdir'], true)
            ->timeout($this->getTimeoutSetting('clean_dir'))
            ->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['releasesdir'] . ($cleandirLimit ? ':' . $cleandirLimit : ''));

        if ($remote['createbackup']) {
            $task->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['backupsdir'] . ($cleandirLimit ? ':' . --$cleandirLimit : ''));
        }

        return $task;
    }
protected function cleanDirsTask($worker, AbstractAuth $auth, $remote)
    {
        $cleandirLimit = isset($remote['cleandir_limit']) ? max(1, $remote['cleandir_limit']) : '';

        $task = $this->taskSsh($worker, $auth)
            ->remoteDirectory($remote['rootdir'], true)
            ->timeout($this->getTimeoutSetting('clean_dir'))
            ->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['releasesdir'] . ($cleandirLimit ? ':' . $cleandirLimit : ''));

        if ($remote['createbackup']) {
            $task->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['backupsdir'] . ($cleandirLimit ? ':' . --$cleandirLimit : ''));
        }

        return $task;
    }
protected function cleanDirsTask ( $ worker , AbstractAuth $ auth , $ remote ) { $ cleandirLimit = isset ( $ remote [ 'cleandir_limit' ] ) ? max ( 1 , $ remote [ 'cleandir_limit' ] ) : '' ; $ task = $ this -> taskSsh ( $ worker , $ auth ) -> remoteDirectory ( $ remote [ 'rootdir' ] , true ) -> timeout ( $ this -> getTimeoutSetting ( 'clean_dir' ) ) -> exec ( 'vendor/bin/robo digipolis:clean-dir ' . $ remote [ 'releasesdir' ] . ( $ cleandirLimit ? ':' . $ cleandirLimit : '' ) ) ; if ( $ remote [ 'createbackup' ] ) { $ task -> exec ( 'vendor/bin/robo digipolis:clean-dir ' . $ remote [ 'backupsdir' ] . ( $ cleandirLimit ? ':' . -- $ cleandirLimit : '' ) ) ; } return $ task ; }
Clean the release and backup directories on the server.

@param string $worker
The server to install the site on.
@param \DigipolisGent\Robo\Task\Deploy\Ssh\Auth\AbstractAuth $auth
The ssh authentication to connect to the server.
@param array $remote
The remote settings for this server.

@return \Robo\Contract\TaskInterface
The clean directories task.
Clean the release and backup directories on the server .