Skip to content

Commit 8ea0465

Browse files
committed
Remove some unused variables and properties
1 parent 3ba55f5 commit 8ea0465

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Encoder/JsonDecode.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class JsonDecode implements DecoderInterface
2424

2525
private $associative;
2626
private $recursionDepth;
27-
private $lastError = JSON_ERROR_NONE;
2827

2928
/**
3029
* Constructs a new JsonDecode instance.
@@ -75,7 +74,7 @@ public function decode($data, $format, array $context = array())
7574

7675
$decodedData = json_decode($data, $associative, $recursionDepth, $options);
7776

78-
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
77+
if (JSON_ERROR_NONE !== json_last_error()) {
7978
throw new UnexpectedValueException(json_last_error_msg());
8079
}
8180

Encoder/JsonEncode.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
class JsonEncode implements EncoderInterface
2222
{
2323
private $options;
24-
private $lastError = JSON_ERROR_NONE;
2524

2625
public function __construct($bitmask = 0)
2726
{
@@ -39,7 +38,7 @@ public function encode($data, $format, array $context = array())
3938

4039
$encodedJson = json_encode($data, $context['json_encode_options']);
4140

42-
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
41+
if (JSON_ERROR_NONE !== json_last_error()) {
4342
throw new UnexpectedValueException(json_last_error_msg());
4443
}
4544

0 commit comments

Comments
 (0)