Per parent task:
- Namespace code and put under src/
- Add type declarations and strict types
- Use constructor service injection where possible
- Update file, class and method comments per current practices
Since FFS classes are referred externally in Yaml files, we must create an id-based system similar to what was done for insertables in T267100: Move insertables to the src/ folder.. I suggest creating a FileFormatFactory service that contains a registry of known file formats using the ObjectFactory specification format. This allows service injection to file format handlers. Params from the YAML files would be passed as additional constructor param.
https://www.mediawiki.org/wiki/Extension:Translate/Namespaces#FileFormatSupport suggests to use namespace FileFormatSupport and name classes FooFfs. I think this could be further improved by using FileFormat as the namespace and FooFormat or FooHandler as the class names, to avoid using the ffs acronym.