@@ -252,14 +252,13 @@ typedef enum {
252
252
INHERITANCE_UNRESOLVED = -1 ,
253
253
INHERITANCE_ERROR = 0 ,
254
254
INHERITANCE_SUCCESS = 1 ,
255
- } _inheritance_status ;
255
+ } inheritance_status ;
256
256
257
257
/* Parameters are contravariant; return types are covariant. We can rely on
258
258
* the fact that they are inverses to improve correctness and simplify code.
259
259
* We can implement covariance, and then implement contravariance simply by
260
260
* reversing the argument order. */
261
- static
262
- _inheritance_status _check_covariance (
261
+ static inheritance_status _check_covariance (
263
262
const zend_function * fe , zend_arg_info * fe_arg_info ,
264
263
const zend_function * proto , zend_arg_info * proto_arg_info )
265
264
{ /* {{{ */
@@ -276,7 +275,7 @@ _inheritance_status _check_covariance(
276
275
}
277
276
278
277
if (ZEND_TYPE_IS_CLASS (fe_type )) {
279
- _inheritance_status code ;
278
+ inheritance_status code ;
280
279
zend_string * fe_class_name = _resolve_parent_and_self (fe , ZEND_TYPE_NAME (fe_type ));
281
280
if (!fe_class_name ) {
282
281
return INHERITANCE_UNRESOLVED ;
@@ -340,8 +339,7 @@ _inheritance_status _check_covariance(
340
339
}
341
340
/* }}} */
342
341
343
- static
344
- _inheritance_status _check_inherited_return_type (
342
+ static inheritance_status _check_inherited_return_type (
345
343
const zend_function * fe , zend_arg_info * fe_arg_info ,
346
344
const zend_function * proto , zend_arg_info * proto_arg_info ) /* {{{ */
347
345
{
@@ -359,8 +357,7 @@ static zend_bool _missing_internal_arginfo(zend_function const *fn)
359
357
return !fn -> common .arg_info && fn -> common .type == ZEND_INTERNAL_FUNCTION ;
360
358
}
361
359
362
- static
363
- _inheritance_status _check_inherited_parameter_type (
360
+ static inheritance_status _check_inherited_parameter_type (
364
361
const zend_function * fe , zend_arg_info * fe_arg_info ,
365
362
const zend_function * proto , zend_arg_info * proto_arg_info ) /* {{{ */
366
363
{
@@ -385,11 +382,11 @@ _inheritance_status _check_inherited_parameter_type(
385
382
}
386
383
/* }}} */
387
384
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 ) /* {{{ */
390
387
{
391
388
uint32_t i , num_args ;
392
- _inheritance_status status ;
389
+ inheritance_status status ;
393
390
394
391
/* If it's a user function then arg_info == NULL means we don't have any parameters but
395
392
* 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
453
450
? & proto -> common .arg_info [i ]
454
451
: & proto -> common .arg_info [proto -> common .num_args ];
455
452
456
- _inheritance_status local_status =
453
+ inheritance_status local_status =
457
454
_check_inherited_parameter_type (fe , fe_arg_info , proto , proto_arg_info );
458
455
if (local_status == INHERITANCE_ERROR ) {
459
456
return INHERITANCE_ERROR ;
@@ -465,9 +462,9 @@ _inheritance_status zend_do_perform_implementation_check(const zend_function *fe
465
462
/* Check return type compatibility, but only if the prototype already specifies
466
463
* a return type. Adding a new return type is always valid. */
467
464
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 );
471
468
if (local_result == INHERITANCE_ERROR ) {
472
469
return INHERITANCE_ERROR ;
473
470
} else if (local_result == INHERITANCE_UNRESOLVED ) {
0 commit comments