private function isPublicProperty($class, $property)
    {
        try {
            $reflectionProperty = new \ReflectionProperty($class, $property);

            return $reflectionProperty->isPublic();
        } catch (\ReflectionException $reflectionExcetion) {
            // Return false if the property doesn't exist
        }

        return false;
    }