protected function checkClassUsesParentsTrait($className)
    {
        $flag = false;
        $classes = array_merge([$className], class_parents($className));

        foreach ($classes as $class) {
            $traits = class_uses($class);
            $flag = $flag || (true === isset($traits[ParentsTrait::class]));
        }

        return $flag;
    }
protected function checkClassUsesParentsTrait($className)
    {
        $flag = false;
        $classes = array_merge([$className], class_parents($className));

        foreach ($classes as $class) {
            $traits = class_uses($class);
            $flag = $flag || (true === isset($traits[ParentsTrait::class]));
        }

        return $flag;
    }
protected function checkClassUsesParentsTrait ( $ className ) { $ flag = false ; $ classes = array_merge ( [ $ className ] , class_parents ( $ className ) ) ; foreach ( $ classes as $ class ) { $ traits = class_uses ( $ class ) ; $ flag = $ flag || ( true === isset ( $ traits [ ParentsTrait :: class ] ) ) ; } return $ flag ; }
Will check if the given class name uses the trait `ParentsTrait`.

@param string $className
@return bool
Will check if the given class name uses the trait ParentsTrait .