mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-22 14:27:09 +00:00
Fix CS for some setters and few more
This commit is contained in:
parent
4d14a5736c
commit
8eabb499cf
1 changed files with 23 additions and 11 deletions
34
gnupg.c
34
gnupg.c
|
@ -666,11 +666,13 @@ PHP_FUNCTION(gnupg_setarmor)
|
||||||
GNUPG_GETOBJ();
|
GNUPG_GETOBJ();
|
||||||
|
|
||||||
if (this) {
|
if (this) {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &armor) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l",
|
||||||
|
&armor) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &res, &armor) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl",
|
||||||
|
&res, &armor) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GNUPG_RES_FETCH();
|
GNUPG_RES_FETCH();
|
||||||
|
@ -693,11 +695,13 @@ PHP_FUNCTION(gnupg_seterrormode)
|
||||||
GNUPG_GETOBJ();
|
GNUPG_GETOBJ();
|
||||||
|
|
||||||
if (this) {
|
if (this) {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &errormode) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l",
|
||||||
|
&errormode) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &res, &errormode) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl",
|
||||||
|
&res, &errormode) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GNUPG_RES_FETCH();
|
GNUPG_RES_FETCH();
|
||||||
|
@ -728,11 +732,13 @@ PHP_FUNCTION(gnupg_setsignmode)
|
||||||
GNUPG_GETOBJ();
|
GNUPG_GETOBJ();
|
||||||
|
|
||||||
if (this) {
|
if (this) {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &signmode) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l",
|
||||||
|
&signmode) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &res, &signmode) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl",
|
||||||
|
&res, &signmode) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GNUPG_RES_FETCH();
|
GNUPG_RES_FETCH();
|
||||||
|
@ -761,7 +767,8 @@ PHP_FUNCTION(gnupg_geterror)
|
||||||
GNUPG_GETOBJ();
|
GNUPG_GETOBJ();
|
||||||
|
|
||||||
if (!this) {
|
if (!this) {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r",
|
||||||
|
&res) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GNUPG_RES_FETCH();
|
GNUPG_RES_FETCH();
|
||||||
|
@ -785,7 +792,8 @@ PHP_FUNCTION(gnupg_getprotocol) {
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ proto array gnupg_keyinfo(string pattern)
|
/* {{{ proto array gnupg_keyinfo(string pattern)
|
||||||
* returns an array with informations about all keys, that matches the given pattern
|
* returns an array with informations about all keys, that matches
|
||||||
|
* the given pattern
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(gnupg_keyinfo)
|
PHP_FUNCTION(gnupg_keyinfo)
|
||||||
{
|
{
|
||||||
|
@ -799,16 +807,20 @@ PHP_FUNCTION(gnupg_keyinfo)
|
||||||
GNUPG_GETOBJ();
|
GNUPG_GETOBJ();
|
||||||
|
|
||||||
if (this) {
|
if (this) {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &searchkey, &searchkey_len) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
|
||||||
|
&searchkey, &searchkey_len) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &res, &searchkey, &searchkey_len) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs",
|
||||||
|
&res, &searchkey, &searchkey_len) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GNUPG_RES_FETCH();
|
GNUPG_RES_FETCH();
|
||||||
}
|
}
|
||||||
if ((PHPC_THIS->err = gpgme_op_keylist_start(PHPC_THIS->ctx, searchkey, 0)) != GPG_ERR_NO_ERROR) {
|
|
||||||
|
PHPC_THIS->err = gpgme_op_keylist_start(PHPC_THIS->ctx, searchkey, 0);
|
||||||
|
if (PHPC_THIS->err != GPG_ERR_NO_ERROR) {
|
||||||
GNUPG_ERR("could not init keylist");
|
GNUPG_ERR("could not init keylist");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue