// __construct, enable, loadClass and checkClass methods public function checkAnnotations($refl, $class): array { // ... if (false !== $doc = $refl->getDocComment()) { if (preg_match('/@final(.*)/', $doc, $matches) { self::$final[$class] = $matches[1]; } } // ... } }