}
$json = FormatJson::decode( file_get_contents( $filename ), true );
- if ( $json === null ) {
+ if ( !is_array( $json ) ) {
$this->fatalError( "Error: Invalid JSON" );
}
while ( $json['manifest_version'] !== ExtensionRegistry::MANIFEST_VERSION ) {
$json['manifest_version'] += 1;
$func = "updateTo{$json['manifest_version']}";
+ // @phan-suppress-next-line PhanUndeclaredMethod
$this->$func( $json );
}