getTraitReflection example


        }

        return [];
    }

    private function getMethodContent(Node $node, Scope $scope, ClassReflection $class): string
    {
        /** @var string $filename */
        $filename = $class->getFileName();

        $trait = $scope->getTraitReflection();

        if ($trait) {
            /** @var string $filename */
            $filename = $trait->getFileName();
        }

        $file = new \SplFileObject($filename);
        $file->seek($node->getStartLine() - 1);

        $content = '';
        for ($i = 0; $i <= ($node->getEndLine() - $node->getStartLine()); ++$i) {
            
Home | Imprint | This part of the site doesn't use cookies.