original_string: public function getActualAttributeName(Entity $entity, $name, $hint = '', $force = false)
      {
          if ($entity->hasAttributeByName($name) || $force) {
              if (!$entity->hasAttributeByName($name . $hint)) {
                  return [$name, $hint];
              }
  
              $append = 1;
  
              while ($entity->hasAttributeByName($name . $append . $hint)) {
                  $append++;
              }
  
              return [$name . $append, $hint];
          }
  
          return [$name, ''];
      }
code: public function getActualAttributeName(Entity $entity, $name, $hint = '', $force = false)
      {
          if ($entity->hasAttributeByName($name) || $force) {
              if (!$entity->hasAttributeByName($name . $hint)) {
                  return [$name, $hint];
              }
  
              $append = 1;
  
              while ($entity->hasAttributeByName($name . $append . $hint)) {
                  $append++;
              }
  
              return [$name . $append, $hint];
          }
  
          return [$name, ''];
      }
code_tokens: public function getActualAttributeName ( Entity $ entity , $ name , $ hint = '' , $ force = false ) { if ( $ entity -> hasAttributeByName ( $ name ) || $ force ) { if ( ! $ entity -> hasAttributeByName ( $ name . $ hint ) ) { return [ $ name , $ hint ] ; } $ append = 1 ; while ( $ entity -> hasAttributeByName ( $ name . $ append . $ hint ) ) { $ append ++ ; } return [ $ name . $ append , $ hint ] ; } return [ $ name , '' ] ; }
docstring: Sometimes the automatic name cannot be used because the entity already has an attribute with that name or because is linked many times.
  This method gives an actual final name that will be unique.
  
  @param Entity  $entity
  @param string  $name
  @param string  $hint
  @param boolean $force If it should force the use of the hint
  
  @return array
docstring_tokens: Sometimes the automatic name cannot be used because the entity already has an attribute with that name or because is linked many times . This method gives an actual final name that will be unique .