original_string: private function registerAnnotation($class)
      {
          /** @var CustomField $annotation */
          if ($annotation = $this->annotationReader->getClassAnnotation(
              new \ReflectionClass($class),
              'Lullabot\Mpx\DataService\Annotation\CustomField'
          )) {
              if (!is_subclass_of($class, CustomFieldInterface::class)) {
                  throw new \RuntimeException(sprintf('%s must implement %s.', $class, CustomFieldInterface::class));
              }
  
              $this->customFields[$annotation->service][$annotation->objectType][$annotation->namespace] = new DiscoveredCustomField(
                  $class, $annotation
              );
          }
      }
code: private function registerAnnotation($class)
      {
          /** @var CustomField $annotation */
          if ($annotation = $this->annotationReader->getClassAnnotation(
              new \ReflectionClass($class),
              'Lullabot\Mpx\DataService\Annotation\CustomField'
          )) {
              if (!is_subclass_of($class, CustomFieldInterface::class)) {
                  throw new \RuntimeException(sprintf('%s must implement %s.', $class, CustomFieldInterface::class));
              }
  
              $this->customFields[$annotation->service][$annotation->objectType][$annotation->namespace] = new DiscoveredCustomField(
                  $class, $annotation
              );
          }
      }
code_tokens: private function registerAnnotation ( $ class ) { /** @var CustomField $annotation */ if ( $ annotation = $ this -> annotationReader -> getClassAnnotation ( new \ ReflectionClass ( $ class ) , 'Lullabot\Mpx\DataService\Annotation\CustomField' ) ) { if ( ! is_subclass_of ( $ class , CustomFieldInterface :: class ) ) { throw new \ RuntimeException ( sprintf ( '%s must implement %s.' , $ class , CustomFieldInterface :: class ) ) ; } $ this -> customFields [ $ annotation -> service ] [ $ annotation -> objectType ] [ $ annotation -> namespace ] = new DiscoveredCustomField ( $ class , $ annotation ) ; } }
docstring: Register an annotation and it's custom fields.
  
  @param string $class The class to inspect for a CustomField annotation.
docstring_tokens: Register an annotation and it s custom fields .