Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / consolidation / output-formatters / src / Validate / ValidationInterface.php
1 <?php
2 namespace Consolidation\OutputFormatters\Validate;
3
4 /**
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.
9  */
10 interface ValidationInterface
11 {
12     /**
13      * Return true if the specified format is valid for use with
14      * this formatter.
15      */
16     public function isValidDataType(\ReflectionClass $dataType);
17
18     /**
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.
22      *
23      * @param mixed $structuredData Data to validate
24      *
25      * @return mixed
26      */
27     public function validate($structuredData);
28 }