* @return string|string[] An error or list of errors in the
* provided $datum. When no errors exist the empty array is
* returned.
+ * @suppress PhanUndeclaredMethod
*/
public static function getErrors( AvroSchema $schema, $datum ) {
switch ( $schema->type ) {
$errors[] = $result;
}
if ( $errors ) {
+ // @phan-suppress-next-line PhanTypeMismatchReturn
return [ "Expected any one of these to be true", $errors ];
}
return "No schemas provided to union";