public static function getProperties(Reader $reader, ReflectionClass $class)
    {
        $props  = $class->getProperties();
        $result = [];

        foreach ($props as $property) {
            // skip statics
            if ($property->isStatic()) {
                continue;
            }

            // check whether we have an exclude annotation
            $exclude = $reader->getPropertyAnnotation($property, Annotation\Exclude::class);
            if ($exclude !== null) {
                continue;
            }

            // get the property name
            $key  = $reader->getPropertyAnnotation($property, Annotation\Key::class);
            $name = null;

            if ($key !== null) {
                $name = $key->getKey();
            }

            if (empty($name)) {
                $name = $property->getName();
            }

            $result[$name] = $property;
        }

        return $result;
    }