original_string: public function objectToArray($object)
      {
          if (!is_object($object) && !is_array($object)) {
              return $object;
          }
          if (is_object($object)) {
              $object = get_object_vars($object);
          }
  
          return array_map([get_class(), 'objectToArray'], $object);
      }
code: public function objectToArray($object)
      {
          if (!is_object($object) && !is_array($object)) {
              return $object;
          }
          if (is_object($object)) {
              $object = get_object_vars($object);
          }
  
          return array_map([get_class(), 'objectToArray'], $object);
      }
code_tokens: public function objectToArray ( $ object ) { if ( ! is_object ( $ object ) && ! is_array ( $ object ) ) { return $ object ; } if ( is_object ( $ object ) ) { $ object = get_object_vars ( $ object ) ; } return array_map ( [ get_class ( ) , 'objectToArray' ] , $ object ) ; }
docstring: Converts a bowl of object to an array.
  
  @todo: replace with function that only shows accessible properties of the object
  
  @param $object
  
  @return array
docstring_tokens: Converts a bowl of object to an array .