Can you rewrite this to be consistent with [ProxyGenerator](https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Proxy/ProxyGenerator.php)?

```
if ( ! is_dir($parentDirectory) && (false === @mkdir($parentDirectory, 0775, true))) {
    throw UnexpectedValueException::proxyDirectoryNotWritable();
}

if ( ! is_writable($parentDirectory)) {
    throw UnexpectedValueException::proxyDirectoryNotWritable();
}
`

There's no need for `elseif`'s.