src/Floppy/Client/FileTypeGuesser.php
public function guessFileType(FileId $fileId)
    {
        $extension = strtolower(\pathinfo($fileId->id(), PATHINFO_EXTENSION));

        foreach($this->fileTypeExtensions as $fileType => $extensions) {
            if(in_array($extension, $extensions)) {
                return $fileType;
            }
        }

        return 'file';
    }
public function guessFileType(FileId $fileId)
    {
        $extension = strtolower(\pathinfo($fileId->id(), PATHINFO_EXTENSION));

        foreach($this->fileTypeExtensions as $fileType => $extensions) {
            if(in_array($extension, $extensions)) {
                return $fileType;
            }
        }

        return 'file';
    }
public function guessFileType ( FileId $ fileId ) { $ extension = strtolower ( \ pathinfo ( $ fileId -> id ( ) , PATHINFO_EXTENSION ) ) ; foreach ( $ this -> fileTypeExtensions as $ fileType => $ extensions ) { if ( in_array ( $ extension , $ extensions ) ) { return $ fileType ; } } return 'file' ; }
Guess file type code

@param FileId $fileId
@return string
Guess file type code