original_string: private function getTransactionalAnnotation(RouteMatch $routeMatch) : ?Transactional
      {
          $method = $routeMatch->getControllerReflection();
  
          if ($method instanceof \ReflectionMethod) {
              $annotations = $this->annotationReader->getMethodAnnotations($method);
  
              foreach ($annotations as $annotation) {
                  if ($annotation instanceof Transactional) {
                      return $annotation;
                  }
              }
          }
  
          return null;
      }
code: private function getTransactionalAnnotation(RouteMatch $routeMatch) : ?Transactional
      {
          $method = $routeMatch->getControllerReflection();
  
          if ($method instanceof \ReflectionMethod) {
              $annotations = $this->annotationReader->getMethodAnnotations($method);
  
              foreach ($annotations as $annotation) {
                  if ($annotation instanceof Transactional) {
                      return $annotation;
                  }
              }
          }
  
          return null;
      }
code_tokens: private function getTransactionalAnnotation ( RouteMatch $ routeMatch ) : ? Transactional { $ method = $ routeMatch -> getControllerReflection ( ) ; if ( $ method instanceof \ ReflectionMethod ) { $ annotations = $ this -> annotationReader -> getMethodAnnotations ( $ method ) ; foreach ( $ annotations as $ annotation ) { if ( $ annotation instanceof Transactional ) { return $ annotation ; } } } return null ; }
docstring: Returns the Transactional annotation for the controller.
  
  @param \Brick\App\RouteMatch $routeMatch
  
  @return Transactional|null The annotation, or NULL if the controller is not transactional.
  
  @todo add support for annotations on functions when Doctrine will handle them
docstring_tokens: Returns the Transactional annotation for the controller .