Fluid's TagBuilder::getAttribute() is doc-typed as returning `string`,
but the description says it returns `?string`. That meant PHPStan
believes the `$file !== null` check is unnecessary, when it actually is.
The TagBuilder class is not in core, though, but in the typo3fluid
vendored package, so it cannot be corrected from here.
However, the `$attributes` array is already requested above, and then
href/src is removed from it anyway because it's the same piece of data.
So just reading off of the array we already have and doing missing-value
handling there ourselves resolves the PHPStan issue, is slightly more
consistent with what the next line does (the unset() call), and is ever
so slightly faster as it skips a method call.