code: private function getClassByName($className)
      {
          if (! isset($this->classByNames[$className])) {
              foreach ($this->metadata as $class) {
                  if ($class->getName() === $className) {
                      $this->classByNames[$className] = $class;
                      break;
                  }
              }
          }
  
          return $this->classByNames[$className] ?? null;
      }
docs: Retrieve a class metadata instance by name from the given array
  
  @param string          $className
  
  @return ClassMetadata|null