dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add MW_REST_API and MW_ENTRY_POINT"
[lhc/web/wiklou.git]
/
includes
/
utils
/
AvroValidator.php
diff --git
a/includes/utils/AvroValidator.php
b/includes/utils/AvroValidator.php
index
153b313
..
f3a8810
100644
(file)
--- a/
includes/utils/AvroValidator.php
+++ b/
includes/utils/AvroValidator.php
@@
-34,6
+34,7
@@
class AvroValidator {
* @return string|string[] An error or list of errors in the
* provided $datum. When no errors exist the empty array is
* returned.
* @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 ) {
*/
public static function getErrors( AvroSchema $schema, $datum ) {
switch ( $schema->type ) {
@@
-124,6
+125,7
@@
class AvroValidator {
$errors[] = $result;
}
if ( $errors ) {
$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";
return [ "Expected any one of these to be true", $errors ];
}
return "No schemas provided to union";