<?php
 namespace MongoDB\GridFS\Exception;
 use MongoDB\Exception\RuntimeException;
 use function sprintf;
 class CorruptFileException extends RuntimeException {
 public static function missingChunk($expectedIndex) {
 return new static(sprintf('Chunk not found for index "%d"', $expectedIndex));
 }
 public static function unexpectedIndex($index, $expectedIndex) {
 return new static(sprintf('Expected chunk to have index "%d" but found "%d"', $expectedIndex, $index));
 }
 public static function unexpectedSize($size, $expectedSize) {
 return new static(sprintf('Expected chunk to have size "%d" but found "%d"', $expectedSize, $size));
 }
 }
 