JsonCodec: fix ${var} deprecation notice in error message
Change-Id: I55c86098f4fae8a2e686e48cb74c4fbd3530ce51
This commit is contained in:
parent
1f7b364be1
commit
8409b9ebd3
1 changed files with 3 additions and 3 deletions
|
|
@ -171,11 +171,11 @@ class JsonCodec
|
|||
if ( is_a( $got, $expectedClass, true ) ) {
|
||||
// Everything ok!
|
||||
} else {
|
||||
throw new JsonException( "Expected ${expectedClass} got ${got}" );
|
||||
throw new JsonException( "Expected {$expectedClass} got {$got}" );
|
||||
}
|
||||
} else {
|
||||
$got = get_debug_type( $json );
|
||||
throw new JsonException( "Expected ${expectedClass} got ${got}" );
|
||||
throw new JsonException( "Expected {$expectedClass} got {$got}" );
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
|
@ -184,7 +184,7 @@ class JsonCodec
|
|||
throw new JsonException( $e->getMessage() );
|
||||
}
|
||||
if ( $expectedClass && !is_a( $result, $expectedClass, false ) ) {
|
||||
throw new JsonException( "Unexpected class: ${expectedClass}" );
|
||||
throw new JsonException( "Unexpected class: {$expectedClass}" );
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue