src/IMAP/Client.php
public function disconnect() {
        if ($this->isConnected() && $this->connection !== false && is_integer($this->connection) === false) {
            $this->errors = array_merge($this->errors, imap_errors() ?: []);
            $this->connected = !imap_close($this->connection, IMAP::CL_EXPUNGE);
        }

        return $this;
    }
public function disconnect() {
        if ($this->isConnected() && $this->connection !== false && is_integer($this->connection) === false) {
            $this->errors = array_merge($this->errors, imap_errors() ?: []);
            $this->connected = !imap_close($this->connection, IMAP::CL_EXPUNGE);
        }

        return $this;
    }
public function disconnect ( ) { if ( $ this -> isConnected ( ) && $ this -> connection !== false && is_integer ( $ this -> connection ) === false ) { $ this -> errors = array_merge ( $ this -> errors , imap_errors ( ) ? : [ ] ) ; $ this -> connected = ! imap_close ( $ this -> connection , IMAP :: CL_EXPUNGE ) ; } return $ this ; }
Disconnect from server.

@return $this
Disconnect from server .