original_string: protected function parseToArray($object): array
      {
          if (!is_array($object)) {
              $attributes = method_exists($object, 'getAttributes')
                  ? $object->getAttributes()
                  : get_object_vars($object);
  
              return $attributes;
          }
  
          return $object;
      }
code: protected function parseToArray($object): array
      {
          if (!is_array($object)) {
              $attributes = method_exists($object, 'getAttributes')
                  ? $object->getAttributes()
                  : get_object_vars($object);
  
              return $attributes;
          }
  
          return $object;
      }
code_tokens: protected function parseToArray ( $ object ) : array { if ( ! is_array ( $ object ) ) { $ attributes = method_exists ( $ object , 'getAttributes' ) ? $ object -> getAttributes ( ) : get_object_vars ( $ object ) ; return $ attributes ; } return $ object ; }
docstring: Parses an object to an array before sending it to the SchemaMapper.
  
  @param mixed $object the object that will be transformed into an array
  
  @return array
docstring_tokens: Parses an object to an array before sending it to the SchemaMapper .