Here's a cleaner (imo) version of it:

```php
if (null === $driverName) {
    continue;
}

$options = $this->getOptions($sl, 'driver', $driverName);
$driver->addDriver($this->createDriver($sl, $options), $namespace); 
```