22 \ReflectionProperty $property,
23 string $annotationName
25 $cacheKey =
"$annotationName@{$property->class}::{$property->name}";
26 if ( !isset( self::$cache[$cacheKey] ) ) {
27 $comment = $property->getDocComment();
28 if ( $comment ===
false ) {
29 self::$cache[$cacheKey] =
false;
31 $encAnnotation = preg_quote( $annotationName,
'!' );
32 self::$cache[$cacheKey] =
33 (bool)preg_match(
"!^[ \t]*(/\*\*|\*)[ \t]*@$encAnnotation\b!im", $comment );
36 return self::$cache[$cacheKey];