protected function setErrorCode($exitcode)
    {
        if ($this->needPassphrase > 0) {
            return Crypt_GPG::ERROR_MISSING_PASSPHRASE;
        }

        if ($this->operation == 'import') {
            return Crypt_GPG::ERROR_NONE;
        }

        if ($this->operation == 'decrypt' && !empty($this->data['DecryptionOkay'])) {
            if (!empty($this->data['IgnoreVerifyErrors'])) {
                return Crypt_GPG::ERROR_NONE;
            }
            if (!empty($this->data['MissingKeys'])) {
                return Crypt_GPG::ERROR_KEY_NOT_FOUND;
            }
        }

        return Crypt_GPG::ERROR_UNKNOWN;
    }
protected function setErrorCode($exitcode)
    {
        if ($this->needPassphrase > 0) {
            return Crypt_GPG::ERROR_MISSING_PASSPHRASE;
        }

        if ($this->operation == 'import') {
            return Crypt_GPG::ERROR_NONE;
        }

        if ($this->operation == 'decrypt' && !empty($this->data['DecryptionOkay'])) {
            if (!empty($this->data['IgnoreVerifyErrors'])) {
                return Crypt_GPG::ERROR_NONE;
            }
            if (!empty($this->data['MissingKeys'])) {
                return Crypt_GPG::ERROR_KEY_NOT_FOUND;
            }
        }

        return Crypt_GPG::ERROR_UNKNOWN;
    }
protected function setErrorCode ( $ exitcode ) { if ( $ this -> needPassphrase > 0 ) { return Crypt_GPG :: ERROR_MISSING_PASSPHRASE ; } if ( $ this -> operation == 'import' ) { return Crypt_GPG :: ERROR_NONE ; } if ( $ this -> operation == 'decrypt' && ! empty ( $ this -> data [ 'DecryptionOkay' ] ) ) { if ( ! empty ( $ this -> data [ 'IgnoreVerifyErrors' ] ) ) { return Crypt_GPG :: ERROR_NONE ; } if ( ! empty ( $ this -> data [ 'MissingKeys' ] ) ) { return Crypt_GPG :: ERROR_KEY_NOT_FOUND ; } } return Crypt_GPG :: ERROR_UNKNOWN ; }
Check exit code of the GPG operation.

@param int $exitcode GPG process exit code

@return int Internal error code
Check exit code of the GPG operation .