src/Rocketeer/Services/Connections/ConnectionsHandler.php
protected function unifyMultiserversDeclarations($connection)
    {
        $connection = (array) $connection;
        foreach ($connection as $key => $servers) {
            $servers = Arr::get($servers, 'servers', [$servers]);
            $servers = array_values($servers);
            foreach ($servers as &$server) {
                if (array_key_exists('key', $server)) {
                    $server['key'] = str_replace('~/', $this->paths->getUserHomeFolder().'/', $server['key']);
                }
            }

            $connection[$key] = ['servers' => $servers];
        }

        return $connection;
    }
protected function unifyMultiserversDeclarations($connection)
    {
        $connection = (array) $connection;
        foreach ($connection as $key => $servers) {
            $servers = Arr::get($servers, 'servers', [$servers]);
            $servers = array_values($servers);
            foreach ($servers as &$server) {
                if (array_key_exists('key', $server)) {
                    $server['key'] = str_replace('~/', $this->paths->getUserHomeFolder().'/', $server['key']);
                }
            }

            $connection[$key] = ['servers' => $servers];
        }

        return $connection;
    }
protected function unifyMultiserversDeclarations ( $ connection ) { $ connection = ( array ) $ connection ; foreach ( $ connection as $ key => $ servers ) { $ servers = Arr :: get ( $ servers , 'servers' , [ $ servers ] ) ; $ servers = array_values ( $ servers ) ; foreach ( $ servers as & $ server ) { if ( array_key_exists ( 'key' , $ server ) ) { $ server [ 'key' ] = str_replace ( '~/' , $ this -> paths -> getUserHomeFolder ( ) . '/' , $ server [ 'key' ] ) ; } } $ connection [ $ key ] = [ 'servers' => $ servers ] ; } return $ connection ; }
Unify a connection's declaration into the servers form.

@param array $connection

@return array
Unify a connection s declaration into the servers form .