src/Util/AnnotationFilterExtractorTrait.php
private function getFilterProperties(ApiFilter $filterAnnotation, \ReflectionClass $reflectionClass, \ReflectionProperty $reflectionProperty = null): array
    {
        $properties = [];

        if ($filterAnnotation->properties) {
            foreach ($filterAnnotation->properties as $property => $strategy) {
                if (\is_int($property)) {
                    $properties[$strategy] = null;
                } else {
                    $properties[$property] = $strategy;
                }
            }

            return $properties;
        }

        if (null !== $reflectionProperty) {
            $properties[$reflectionProperty->getName()] = $filterAnnotation->strategy ?: null;

            return $properties;
        }

        if ($filterAnnotation->strategy) {
            foreach ($reflectionClass->getProperties() as $reflectionProperty) {
                $properties[$reflectionProperty->getName()] = $filterAnnotation->strategy;
            }
        }

        return $properties;
    }
private function getFilterProperties(ApiFilter $filterAnnotation, \ReflectionClass $reflectionClass, \ReflectionProperty $reflectionProperty = null): array
    {
        $properties = [];

        if ($filterAnnotation->properties) {
            foreach ($filterAnnotation->properties as $property => $strategy) {
                if (\is_int($property)) {
                    $properties[$strategy] = null;
                } else {
                    $properties[$property] = $strategy;
                }
            }

            return $properties;
        }

        if (null !== $reflectionProperty) {
            $properties[$reflectionProperty->getName()] = $filterAnnotation->strategy ?: null;

            return $properties;
        }

        if ($filterAnnotation->strategy) {
            foreach ($reflectionClass->getProperties() as $reflectionProperty) {
                $properties[$reflectionProperty->getName()] = $filterAnnotation->strategy;
            }
        }

        return $properties;
    }
private function getFilterProperties ( ApiFilter $ filterAnnotation , \ ReflectionClass $ reflectionClass , \ ReflectionProperty $ reflectionProperty = null ) : array { $ properties = [ ] ; if ( $ filterAnnotation -> properties ) { foreach ( $ filterAnnotation -> properties as $ property => $ strategy ) { if ( \ is_int ( $ property ) ) { $ properties [ $ strategy ] = null ; } else { $ properties [ $ property ] = $ strategy ; } } return $ properties ; } if ( null !== $ reflectionProperty ) { $ properties [ $ reflectionProperty -> getName ( ) ] = $ filterAnnotation -> strategy ? : null ; return $ properties ; } if ( $ filterAnnotation -> strategy ) { foreach ( $ reflectionClass -> getProperties ( ) as $ reflectionProperty ) { $ properties [ $ reflectionProperty -> getName ( ) ] = $ filterAnnotation -> strategy ; } } return $ properties ; }
Given a filter annotation and reflection elements, find out the properties where the filter is applied.
Given a filter annotation and reflection elements find out the properties where the filter is applied .