code: private function configureStockUnitDiscriminatorMap(LoadClassMetadataEventArgs $eventArgs)
      {
          /** @var ClassMetadata $metadata */
          $metadata = $eventArgs->getClassMetadata();
  
          if (!is_subclass_of($metadata->name, Stock\StockUnitInterface::class)) {
              return;
          }
  
          $this
              ->getStockUnitMapper($eventArgs->getEntityManager())
              ->processClassMetadata($metadata);
      }
docs: Configures the stock unit discriminator map.
  
  @param LoadClassMetadataEventArgs $eventArgs