slogsdon/php-flat-file

View on GitHub
src/FileParser/FileParserAbstract.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php declare(strict_types=1);

namespace FlatFile\FileParser;

abstract class FileParserAbstract implements FileParserInterface
{
    public function canParse(\SplFileInfo $file): bool
    {
        return in_array(
            strtolower($file->getExtension()),
            $this->supportedFileExtensions()
        );
    }
}