Drupal 8, get value of field user in proper way, not an array In a custom module, I load an user and I want get some field value

I do this : 

$value = $user-&gt;get('field_value')-&gt;getValue();


but $value contain an array, not the value. I must do ugly command for get the value: 

$value = reset(reset($user-&gt;get('field_value')-&gt;getValue()));
// or 
$value = $user-&gt;get('field_value')-&gt;getValue()[0]['value'];
// $value = 4


There isn't any Drupal way for get the value of a field, not an array ? 

Thanks =)
The method getValue() is used to get an array:

$array = $user-&gt;get('field_value')-&gt;getValue();


If you want to get a skalar use:

$value = $user-&gt;get('field_value')-&gt;value;


Both methods look similar, but do different things:

The method getValue() is to get the complete array of a field, which is quite useful for multiple value fields or multiple properties.

The method -&gt;value gets the property with the same name.  Most standard fields use value as the main property.