Skip to content

Commit eb42b0b

Browse files
committed
Coding style
1 parent 7a7896d commit eb42b0b

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

Zend/zend_inheritance.c

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,13 @@ typedef enum {
252252
INHERITANCE_UNRESOLVED = -1,
253253
INHERITANCE_ERROR = 0,
254254
INHERITANCE_SUCCESS = 1,
255-
} _inheritance_status;
255+
} inheritance_status;
256256

257257
/* Parameters are contravariant; return types are covariant. We can rely on
258258
* the fact that they are inverses to improve correctness and simplify code.
259259
* We can implement covariance, and then implement contravariance simply by
260260
* reversing the argument order. */
261-
static
262-
_inheritance_status _check_covariance(
261+
static inheritance_status _check_covariance(
263262
const zend_function *fe, zend_arg_info *fe_arg_info,
264263
const zend_function *proto, zend_arg_info *proto_arg_info)
265264
{ /* {{{ */
@@ -276,7 +275,7 @@ _inheritance_status _check_covariance(
276275
}
277276

278277
if (ZEND_TYPE_IS_CLASS(fe_type)) {
279-
_inheritance_status code;
278+
inheritance_status code;
280279
zend_string *fe_class_name = _resolve_parent_and_self(fe, ZEND_TYPE_NAME(fe_type));
281280
if (!fe_class_name) {
282281
return INHERITANCE_UNRESOLVED;
@@ -340,8 +339,7 @@ _inheritance_status _check_covariance(
340339
}
341340
/* }}} */
342341

343-
static
344-
_inheritance_status _check_inherited_return_type(
342+
static inheritance_status _check_inherited_return_type(
345343
const zend_function *fe, zend_arg_info *fe_arg_info,
346344
const zend_function *proto, zend_arg_info *proto_arg_info) /* {{{ */
347345
{
@@ -359,8 +357,7 @@ static zend_bool _missing_internal_arginfo(zend_function const *fn)
359357
return !fn->common.arg_info && fn->common.type == ZEND_INTERNAL_FUNCTION;
360358
}
361359

362-
static
363-
_inheritance_status _check_inherited_parameter_type(
360+
static inheritance_status _check_inherited_parameter_type(
364361
const zend_function *fe, zend_arg_info *fe_arg_info,
365362
const zend_function *proto, zend_arg_info *proto_arg_info) /* {{{ */
366363
{
@@ -385,11 +382,11 @@ _inheritance_status _check_inherited_parameter_type(
385382
}
386383
/* }}} */
387384

388-
static
389-
_inheritance_status zend_do_perform_implementation_check(const zend_function *fe, const zend_function *proto) /* {{{ */
385+
static inheritance_status zend_do_perform_implementation_check(
386+
const zend_function *fe, const zend_function *proto) /* {{{ */
390387
{
391388
uint32_t i, num_args;
392-
_inheritance_status status;
389+
inheritance_status status;
393390

394391
/* If it's a user function then arg_info == NULL means we don't have any parameters but
395392
* we still need to do the arg number checks. We are only willing to ignore this for internal
@@ -453,7 +450,7 @@ _inheritance_status zend_do_perform_implementation_check(const zend_function *fe
453450
? &proto->common.arg_info[i]
454451
: &proto->common.arg_info[proto->common.num_args];
455452

456-
_inheritance_status local_status =
453+
inheritance_status local_status =
457454
_check_inherited_parameter_type(fe, fe_arg_info, proto, proto_arg_info);
458455
if (local_status == INHERITANCE_ERROR) {
459456
return INHERITANCE_ERROR;
@@ -465,9 +462,9 @@ _inheritance_status zend_do_perform_implementation_check(const zend_function *fe
465462
/* Check return type compatibility, but only if the prototype already specifies
466463
* a return type. Adding a new return type is always valid. */
467464
if (proto->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
468-
_inheritance_status local_result =
469-
_check_inherited_return_type(fe, fe->common.arg_info - 1,
470-
proto, proto->common.arg_info - 1);
465+
inheritance_status local_result =
466+
_check_inherited_return_type(
467+
fe, fe->common.arg_info - 1, proto, proto->common.arg_info - 1);
471468
if (local_result == INHERITANCE_ERROR) {
472469
return INHERITANCE_ERROR;
473470
} else if (local_result == INHERITANCE_UNRESOLVED) {

0 commit comments

Comments
 (0)