original_string: private static function objectProperties($object): array
      {
          if ($object instanceof Serializable) {
              return ['$' => $object->serialize()];
          }
  
          $class = get_class($object);
          $properties = [];
  
          do {
              try {
                  $properties += Closure::bind(function () use ($object) {
                      return get_object_vars($object);
                  }, null, $class)->__invoke();
              } catch (Throwable $e) {
                  return get_object_vars($object);
              }
          } while ($class = get_parent_class($class));
  
          return method_exists($object, '__sleep')
              ? array_intersect_key($properties, array_flip($object->__sleep()))
              : $properties;
      }
code: private static function objectProperties($object): array
      {
          if ($object instanceof Serializable) {
              return ['$' => $object->serialize()];
          }
  
          $class = get_class($object);
          $properties = [];
  
          do {
              try {
                  $properties += Closure::bind(function () use ($object) {
                      return get_object_vars($object);
                  }, null, $class)->__invoke();
              } catch (Throwable $e) {
                  return get_object_vars($object);
              }
          } while ($class = get_parent_class($class));
  
          return method_exists($object, '__sleep')
              ? array_intersect_key($properties, array_flip($object->__sleep()))
              : $properties;
      }
code_tokens: private static function objectProperties ( $ object ) : array { if ( $ object instanceof Serializable ) { return [ '$' => $ object -> serialize ( ) ] ; } $ class = get_class ( $ object ) ; $ properties = [ ] ; do { try { $ properties += Closure :: bind ( function ( ) use ( $ object ) { return get_object_vars ( $ object ) ; } , null , $ class ) -> __invoke ( ) ; } catch ( Throwable $ e ) { return get_object_vars ( $ object ) ; } } while ( $ class = get_parent_class ( $ class ) ) ; return method_exists ( $ object , '__sleep' ) ? array_intersect_key ( $ properties , array_flip ( $ object -> __sleep ( ) ) ) : $ properties ; }
docstring: Get array of all the object properties.
  
  @param object $object
  
  @return mixed[] The array of all the object properties.
docstring_tokens: Get array of all the object properties .