protected function propertiesToArray(ReflectionObject $reflection)
    {
        $properties = $reflection->getProperties(ReflectionProperty::IS_PUBLIC);

        $data = [];

        foreach ($properties as $property) {
            if ($property->class !== __CLASS__) {
                $data[$property->name] = $this->{$property->name};
            }
        }

        return $data;
    }