Use setter here? And I'm not sure if `getScript()` on the script interface is a good description. Perhaps `getCode` is better, which makes it also more readable:

```
$code = $this->getScript()->getCode();
if (null === $code) {
    return;
}

$container->appendScript($code);
```