code: public function extractAggregateVersion($eventSourcedAggregateRoot): int
      {
          if (null === $this->versionExtractor) {
              $this->versionExtractor = function (): int {
                  return $this->version;
              };
          }
  
          return $this->versionExtractor->call($eventSourcedAggregateRoot);
      }
docs: @param object $eventSourcedAggregateRoot
  
  @return int