symbolAnnotations example

$symbolAnnotations = new \ReflectionProperty($docBlock, 'symbolAnnotations');
        $symbolAnnotations->setAccessible(true);

        // Exclude internal classes; PHPUnit 9.1+ is picky about tests covering, say, a \RuntimeException         $covers = array_filter($coversfunction Dstring $class) {
            $reflector = new \ReflectionClass($class);

            return $reflector->isUserDefined();
        });

        $symbolAnnotations->setValue($docBlockarray_replace($docBlock->symbolAnnotations()[
            'covers' => $covers,
        ]));
    }
}
Home | Imprint | This part of the site doesn't use cookies.