Closed stefandoorn closed 6 years ago
I would prefer to modify the return type to string|null and to return null if the helper is not enabled. What do you think about it?
Checked your suggestion. Issue is that further in the code (e.g. in GoogleTagManagerListener
) the results are simply treated as if strings. That would also require rewriting then. Basically it's now weird to use get 'false' returned, looking at the replacements done in GoogleTagManagerListener::onKernelResponse
& the extensions we can use inside the templates. The easy 'improvement' is simply returning a string always I think. In further versions we might need to improve this anyway when we go for 7.1 and return types.
To make it compatible with the return type specified in the phpdoc and the phpdoc of the methods using this method.