private function supports(string $class): bool
    {
        $class = new \ReflectionClass($class);

        // We look for at least one non-static property
        do {
            foreach ($class->getProperties() as $property) {
                if (!$property->isStatic()) {
                    return true;
                }
            }
        } while ($class = $class->getParentClass());

        return false;
    }
private function supports(string $class): bool
    {
        $class = new \ReflectionClass($class);

        // We look for at least one non-static property
        do {
            foreach ($class->getProperties() as $property) {
                if (!$property->isStatic()) {
                    return true;
                }
            }
        } while ($class = $class->getParentClass());

        return false;
    }
private function supports ( string $ class ) : bool { $ class = new \ ReflectionClass ( $ class ) ; // We look for at least one non-static property do { foreach ( $ class -> getProperties ( ) as $ property ) { if ( ! $ property -> isStatic ( ) ) { return true ; } } } while ( $ class = $ class -> getParentClass ( ) ) ; return false ; }
Checks if the given class has any non-static property.
Checks if the given class has any non - static property .