code: private function getProperties($object)
      {
          $properties = [];
  
          $reflection = new \ReflectionObject($object);
          foreach ($reflection->getProperties() as $property) {
              $property->setAccessible(true);
  
              $properties[$property->getName()] = $property->getValue($object);
          }
  
          return $properties;
      }
docs: @param object $object
  
  @return array