[Serializer] fixed CS
This commit is contained in:
parent
6d9f0be0a0
commit
a1ab939c35
@ -55,7 +55,8 @@ class JsonDecode implements DecoderInterface
|
||||
*
|
||||
* @return integer
|
||||
*
|
||||
* @deprecated decode() throws an exception if error found
|
||||
* @deprecated since 2.5, decode() throws an exception if error found, will be removed in 3.0
|
||||
*
|
||||
* @see http://php.net/manual/en/function.json-last-error.php json_last_error
|
||||
*/
|
||||
public function getLastError()
|
||||
@ -105,8 +106,7 @@ class JsonDecode implements DecoderInterface
|
||||
}
|
||||
|
||||
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
|
||||
$message = JsonEncoder::getLastErrorMessage();
|
||||
throw new UnexpectedValueException($message);
|
||||
throw new UnexpectedValueException(JsonEncoder::getLastErrorMessage());
|
||||
}
|
||||
|
||||
return $decodedData;
|
||||
|
@ -33,7 +33,8 @@ class JsonEncode implements EncoderInterface
|
||||
*
|
||||
* @return integer
|
||||
*
|
||||
* @deprecated encode() throws an exception if error found
|
||||
* @deprecated since 2.5, encode() throws an exception if error found, will be removed in 3.0
|
||||
*
|
||||
* @see http://php.net/manual/en/function.json-last-error.php json_last_error
|
||||
*/
|
||||
public function getLastError()
|
||||
@ -53,8 +54,7 @@ class JsonEncode implements EncoderInterface
|
||||
$encodedJson = json_encode($data, $context['json_encode_options']);
|
||||
|
||||
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
|
||||
$message = JsonEncoder::getLastErrorMessage();
|
||||
throw new UnexpectedValueException($message);
|
||||
throw new UnexpectedValueException(JsonEncoder::getLastErrorMessage());
|
||||
}
|
||||
|
||||
return $encodedJson;
|
||||
|
@ -37,12 +37,11 @@ class JsonEncoder implements EncoderInterface, DecoderInterface
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns the last encoding error (if any)
|
||||
*
|
||||
* @return integer
|
||||
*
|
||||
* @deprecated JsonEncode throws exception if an error is found
|
||||
* @deprecated since 2.5, JsonEncode throws exception if an error is found, will be removed in 3.0
|
||||
*/
|
||||
public function getLastEncodingError()
|
||||
{
|
||||
@ -50,12 +49,11 @@ class JsonEncoder implements EncoderInterface, DecoderInterface
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns the last decoding error (if any)
|
||||
*
|
||||
* @return integer
|
||||
*
|
||||
* @deprecated JsonDecode throws exception if an error is found
|
||||
* @deprecated since 2.5, JsonDecode throws exception if an error is found, will be removed in 3.0
|
||||
*/
|
||||
public function getLastDecodingError()
|
||||
{
|
||||
@ -95,7 +93,7 @@ class JsonEncoder implements EncoderInterface, DecoderInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves json_last_error message
|
||||
* Resolves json_last_error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
Reference in New Issue
Block a user