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;
    }