src/PeekAndPoke/Aviator/ServiceContainer/DomainModel/ServiceDefinitionQueue.php
public function findFirstAvailable(Config $config) : ?ServiceDefinition
    {
        /** @var ServiceDefinition $serviceDefinition */
        foreach ($this->getIterator() as $serviceDefinition) {

            if ($serviceDefinition->isAvailable($config)) {
                return $serviceDefinition;
            }
        }

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

            if ($serviceDefinition->isAvailable($config)) {
                return $serviceDefinition;
            }
        }

        return null;
    }
@param Config $config

@return null|ServiceDefinition