protected function proxySubClassesOfClassToEnsureAdvices(string $className, ClassNameIndex $targetClassNameCandidates, ClassNameIndex $treatedSubClasses): ClassNameIndex
    {
        if ($this->reflectionService->isClassReflected($className) === false) {
            return $treatedSubClasses;
        }
        if (trait_exists($className)) {
            return $treatedSubClasses;
        }
        if (interface_exists($className)) {
            return $treatedSubClasses;
        }

        $subClassNames = $this->reflectionService->getAllSubClassNamesForClass($className);
        foreach ($subClassNames as $subClassName) {
            if ($targetClassNameCandidates->hasClassName($subClassName)) {
                continue;
            }

            $treatedSubClasses = $this->addBuildMethodsAndAdvicesCodeToClass($subClassName, $treatedSubClasses);
        }

        return $treatedSubClasses;
    }
protected function proxySubClassesOfClassToEnsureAdvices(string $className, ClassNameIndex $targetClassNameCandidates, ClassNameIndex $treatedSubClasses): ClassNameIndex
    {
        if ($this->reflectionService->isClassReflected($className) === false) {
            return $treatedSubClasses;
        }
        if (trait_exists($className)) {
            return $treatedSubClasses;
        }
        if (interface_exists($className)) {
            return $treatedSubClasses;
        }

        $subClassNames = $this->reflectionService->getAllSubClassNamesForClass($className);
        foreach ($subClassNames as $subClassName) {
            if ($targetClassNameCandidates->hasClassName($subClassName)) {
                continue;
            }

            $treatedSubClasses = $this->addBuildMethodsAndAdvicesCodeToClass($subClassName, $treatedSubClasses);
        }

        return $treatedSubClasses;
    }
protected function proxySubClassesOfClassToEnsureAdvices ( string $ className , ClassNameIndex $ targetClassNameCandidates , ClassNameIndex $ treatedSubClasses ) : ClassNameIndex { if ( $ this -> reflectionService -> isClassReflected ( $ className ) === false ) { return $ treatedSubClasses ; } if ( trait_exists ( $ className ) ) { return $ treatedSubClasses ; } if ( interface_exists ( $ className ) ) { return $ treatedSubClasses ; } $ subClassNames = $ this -> reflectionService -> getAllSubClassNamesForClass ( $ className ) ; foreach ( $ subClassNames as $ subClassName ) { if ( $ targetClassNameCandidates -> hasClassName ( $ subClassName ) ) { continue ; } $ treatedSubClasses = $ this -> addBuildMethodsAndAdvicesCodeToClass ( $ subClassName , $ treatedSubClasses ) ; } return $ treatedSubClasses ; }
Makes sure that any sub classes of an adviced class also build the advices array on construction.

@param string $className The adviced class name
@param ClassNameIndex $targetClassNameCandidates target class names for advices
@param ClassNameIndex $treatedSubClasses Already treated (sub) classes to avoid duplication
@return ClassNameIndex The new collection of already treated classes
Makes sure that any sub classes of an adviced class also build the advices array on construction .