private function findAllInstanceProperties(\ReflectionClass $class = null)
    {
        if (! $class) {
            return [];
        }

        return \array_values(\array_merge(
            $this->findAllInstanceProperties($class->getParentClass() ?: null), // of course PHP is shit.
            \array_values(\array_filter(
                $class->getProperties(),
                function (\ReflectionProperty $property) : bool {
                    return ! $property->isStatic();
                }
            ))
        ));
    }
private function findAllInstanceProperties(\ReflectionClass $class = null)
    {
        if (! $class) {
            return [];
        }

        return \array_values(\array_merge(
            $this->findAllInstanceProperties($class->getParentClass() ?: null), // of course PHP is shit.
            \array_values(\array_filter(
                $class->getProperties(),
                function (\ReflectionProperty $property) : bool {
                    return ! $property->isStatic();
                }
            ))
        ));
    }
private function findAllInstanceProperties ( \ ReflectionClass $ class = null ) { if ( ! $ class ) { return [ ] ; } return \ array_values ( \ array_merge ( $ this -> findAllInstanceProperties ( $ class -> getParentClass ( ) ? : null ) , // of course PHP is shit. \ array_values ( \ array_filter ( $ class -> getProperties ( ) , function ( \ ReflectionProperty $ property ) : bool { return ! $ property -> isStatic ( ) ; } ) ) ) ) ; }
Find all class properties recursively using class hierarchy without
removing name redefinitions

@param \ReflectionClass $class

@return \ReflectionProperty[]
Find all class properties recursively using class hierarchy without removing name redefinitions