$field_values Resolved fields, ref => {type,value,empty}. * @param string $exclude_ref The subject's own name ref, excluded the same way it already was. * @return bool */ public static function hasAnyDescriptiveField( array $field_values, string $exclude_ref ): bool { foreach ( $field_values as $ref => $value ) { if ( $exclude_ref === $ref || in_array( $ref, self::NON_DESCRIPTIVE_REFS, true ) ) { continue; } if ( empty( $value['empty'] ) ) { return true; } } return false; } }