original_string: private function getClass($value)
      {
          if (\is_string($value)) {
              if (!class_exists($value) && !interface_exists($value, false)) {
                  throw new InvalidArgumentException(sprintf('The class or interface "%s" does not exist.', $value));
              }
  
              return ltrim($value, '\\');
          }
  
          if (!\is_object($value)) {
              throw new InvalidArgumentException(sprintf('Cannot create metadata for non-objects. Got: "%s"', \gettype($value)));
          }
  
          return \get_class($value);
      }
code: private function getClass($value)
      {
          if (\is_string($value)) {
              if (!class_exists($value) && !interface_exists($value, false)) {
                  throw new InvalidArgumentException(sprintf('The class or interface "%s" does not exist.', $value));
              }
  
              return ltrim($value, '\\');
          }
  
          if (!\is_object($value)) {
              throw new InvalidArgumentException(sprintf('Cannot create metadata for non-objects. Got: "%s"', \gettype($value)));
          }
  
          return \get_class($value);
      }
code_tokens: private function getClass ( $ value ) { if ( \ is_string ( $ value ) ) { if ( ! class_exists ( $ value ) && ! interface_exists ( $ value , false ) ) { throw new InvalidArgumentException ( sprintf ( 'The class or interface "%s" does not exist.' , $ value ) ) ; } return ltrim ( $ value , '\\' ) ; } if ( ! \ is_object ( $ value ) ) { throw new InvalidArgumentException ( sprintf ( 'Cannot create metadata for non-objects. Got: "%s"' , \ gettype ( $ value ) ) ) ; } return \ get_class ( $ value ) ; }
docstring: Gets a class name for a given class or instance.
  
  @param mixed $value
  
  @return string
  
  @throws InvalidArgumentException If the class does not exists
docstring_tokens: Gets a class name for a given class or instance .