private static function isBeforeMethod(ReflectionMethod $method) { return preg_match('/@before\\b/', $method->getDocComment()); }