2 namespace Consolidation\OutputFormatters\Validate;
5 * Formatters may implement ValidationInterface in order to indicate
6 * whether a particular data structure is supported. Any formatter that does
7 * not implement ValidationInterface is assumed to only operate on arrays,
8 * or data types that implement SimplifyToArrayInterface.
10 interface ValidationInterface
13 * Return true if the specified format is valid for use with
16 public function isValidDataType(\ReflectionClass $dataType);
19 * Throw an IncompatibleDataException if the provided data cannot
20 * be processed by this formatter. Return the source data if it
21 * is valid. The data may be encapsulated or converted if necessary.
23 * @param mixed $structuredData Data to validate
27 public function validate($structuredData);