/** * Logs in to an FTP connection. * * @param string $username * @param string $password * * @return FtpClient * @throws FtpException If the login is incorrect */ public function login($username = '******', $password = '') { $result = $this->ftp->login($username, $password); if ($result === false) { throw new FtpException('Login incorrect'); } return $this; }