* @copyright Meritoo */ class EmptyFileException extends \Exception { /** * Creates exception * * @param string $emptyFilePath Path of the empty file * @return EmptyFileException */ public static function create($emptyFilePath) { $template = 'File with path \'%s\' is empty (has no content). Did you provide path of proper file?'; $message = sprintf($template, $emptyFilePath); return new static($message); } }