Skip to content

Commit

Permalink
Incorporate feedback on removing implicit returns
Browse files Browse the repository at this point in the history
  • Loading branch information
reyjrar committed Jul 20, 2023
1 parent 69b286e commit 38a4f55
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/App/ElasticSearch/Utilities/Metrics.pm
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ sub _build_node_details {
}
}
}

# Fail our type check
return;
}

=attr node_id
Expand All @@ -111,8 +114,11 @@ sub _build_node_id {
return $details->{id};
}

die sprintf "unable to determine node_id for %s:%d",
warn sprintf "unable to determine node_id for %s:%d",
$self->host, $self->port;

# Fail our type check
return;
}

=attr with_cluster_metrics
Expand Down Expand Up @@ -186,6 +192,9 @@ sub collect_node_metrics {
if( my $res = $self->request('_nodes/_local/stats')->content ) {
return $self->_stat_collector( $res->{nodes}{$self->node_id} );
}

# Explicit return of empty list
return;
}

=method collect_cluster_metrics()
Expand Down Expand Up @@ -244,6 +253,8 @@ sub _collect_index_blocks {
return map { { key => "cluster.$_", value => $collected{$_} } } sort keys %collected;
}

# Explicit return of empty list
return;
}

=method collect_index_metrics()
Expand Down

0 comments on commit 38a4f55

Please sign in to comment.