I would use shorten it:

```php
if (!self::$areSupportedAdapters[$name]) {
    return false;
}

if (!isset(self::$areSupportedPaths[$dir][$name])) {
    self::$areSupportedPaths[$dir][$name] = $this->canBeUsedOnPath($dir);
}

return self::$areSupportedPaths[$dir][$name];
```