public function __construct(finfo $fileInfo = null) { $this->fileInfo = $fileInfo ?: new finfo(FILEINFO_MIME_TYPE); }