Skip to content

FileExtractor's getType() should return string or array #79

@klinec

Description

@klinec

I created my own YamlFileExtractor and the issue I had was that similar to php also yaml files can have different extentions .yaml or .yml. But method getType in https://github.com/php-translation/extractor/blob/master/src/FileExtractor/FileExtractor.php can return only string which is then compared to file extension. So I had to create another YmlFileExtractor.

I suggest to change the FileExtractor interface to

    /**
     * The file type the extractor supports.
     *
     * @return string|array
     */
    public function getType();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions