adcc3303bef2758a0a042ca167844a5e111d7163
[yaffs-website] / vendor / consolidation / output-formatters / src / Exception / InvalidFormatException.php
1 <?php
2 namespace Consolidation\OutputFormatters\Exception;
3
4 /**
5  * Represents an incompatibility between the output data and selected formatter.
6  */
7 class InvalidFormatException extends AbstractDataFormatException
8 {
9     public function __construct($format, $data, $validFormats)
10     {
11         $dataDescription = static::describeDataType($data);
12         $message = "The format $format cannot be used with the data produced by this command, which was $dataDescription.  Valid formats are: " . implode(',', $validFormats);
13         parent::__construct($message, 1);
14     }
15 }