code: public function findFirstAvailable(Config $config) : ?ServiceDefinition
      {
          /** @var ServiceDefinition $serviceDefinition */
          foreach ($this->getIterator() as $serviceDefinition) {
  
              if ($serviceDefinition->isAvailable($config)) {
                  return $serviceDefinition;
              }
          }
  
          return null;
      }
docs: @param Config $config
  
  @return null|ServiceDefinition