original_string: private function getAttributeValue(Entry $entry, $attribute)
      {
          if (!$entry->hasAttribute($attribute)) {
              throw new InvalidArgumentException(sprintf('Missing attribute "%s" for user "%s".', $attribute, $entry->getDn()));
          }
  
          $values = $entry->getAttribute($attribute);
  
          if (1 !== \count($values)) {
              throw new InvalidArgumentException(sprintf('Attribute "%s" has multiple values.', $attribute));
          }
  
          return $values[0];
      }
code: private function getAttributeValue(Entry $entry, $attribute)
      {
          if (!$entry->hasAttribute($attribute)) {
              throw new InvalidArgumentException(sprintf('Missing attribute "%s" for user "%s".', $attribute, $entry->getDn()));
          }
  
          $values = $entry->getAttribute($attribute);
  
          if (1 !== \count($values)) {
              throw new InvalidArgumentException(sprintf('Attribute "%s" has multiple values.', $attribute));
          }
  
          return $values[0];
      }
code_tokens: private function getAttributeValue ( Entry $ entry , $ attribute ) { if ( ! $ entry -> hasAttribute ( $ attribute ) ) { throw new InvalidArgumentException ( sprintf ( 'Missing attribute "%s" for user "%s".' , $ attribute , $ entry -> getDn ( ) ) ) ; } $ values = $ entry -> getAttribute ( $ attribute ) ; if ( 1 !== \ count ( $ values ) ) { throw new InvalidArgumentException ( sprintf ( 'Attribute "%s" has multiple values.' , $ attribute ) ) ; } return $ values [ 0 ] ; }
docstring: Fetches a required unique attribute value from an LDAP entry.
  
  @param Entry|null $entry
  @param string     $attribute
docstring_tokens: Fetches a required unique attribute value from an LDAP entry .