private function login()
    {
        ['username' => $username, 'password' => $password] = $this->config;

        // We disable error handling to avoid credentials leak :+1:
        set_error_handler(
            function () {
            }
        );

        $is_logged_in = ftp_login($this->connection, $username, $password);

        restore_error_handler();

        if (!$is_logged_in) {
            $this->disconnect();

            throw new RuntimeException(
                sprintf(
                    'Could not login with connection: (s)ftp://%s@%s:%s',
                    $username,
                    $this->config['hostname'],
                    $this->config['port']
                )
            );
        }
    }
private function login()
    {
        ['username' => $username, 'password' => $password] = $this->config;

        // We disable error handling to avoid credentials leak :+1:
        set_error_handler(
            function () {
            }
        );

        $is_logged_in = ftp_login($this->connection, $username, $password);

        restore_error_handler();

        if (!$is_logged_in) {
            $this->disconnect();

            throw new RuntimeException(
                sprintf(
                    'Could not login with connection: (s)ftp://%s@%s:%s',
                    $username,
                    $this->config['hostname'],
                    $this->config['port']
                )
            );
        }
    }
private function login ( ) { [ 'username' => $ username , 'password' => $ password ] = $ this -> config ; // We disable error handling to avoid credentials leak :+1: set_error_handler ( function ( ) { } ) ; $ is_logged_in = ftp_login ( $ this -> connection , $ username , $ password ) ; restore_error_handler ( ) ; if ( ! $ is_logged_in ) { $ this -> disconnect ( ) ; throw new RuntimeException ( sprintf ( 'Could not login with connection: (s)ftp://%s@%s:%s' , $ username , $ this -> config [ 'hostname' ] , $ this -> config [ 'port' ] ) ) ; } }
Make FTP Login.

@return void
@throws RuntimeException
Make FTP Login .