Bundle/WidgetMapBundle/Warmer/WidgetDataWarmer.php
private function hasLinkTrait(\ReflectionClass $reflect)
    {
        $traits = $reflect->getTraits();
        foreach ($traits as $trait) {
            if ($trait->getName() == LinkTrait::class) {
                return true;
            }
        }

        if ($parentClass = $reflect->getParentClass()) {
            if ($this->hasLinkTrait($parentClass)) {
                return true;
            }
        }

        return false;
    }
private function hasLinkTrait(\ReflectionClass $reflect)
    {
        $traits = $reflect->getTraits();
        foreach ($traits as $trait) {
            if ($trait->getName() == LinkTrait::class) {
                return true;
            }
        }

        if ($parentClass = $reflect->getParentClass()) {
            if ($this->hasLinkTrait($parentClass)) {
                return true;
            }
        }

        return false;
    }
private function hasLinkTrait ( \ ReflectionClass $ reflect ) { $ traits = $ reflect -> getTraits ( ) ; foreach ( $ traits as $ trait ) { if ( $ trait -> getName ( ) == LinkTrait :: class ) { return true ; } } if ( $ parentClass = $ reflect -> getParentClass ( ) ) { if ( $ this -> hasLinkTrait ( $ parentClass ) ) { return true ; } } return false ; }
Check if reflection class has LinkTrait.

@param \ReflectionClass $reflect

@return bool
Check if reflection class has LinkTrait .