Skip to content

Commit 188ccea

Browse files
committed
unify short ternary operator
1 parent 78856ce commit 188ccea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Encoder/JsonEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class JsonEncoder implements EncoderInterface, DecoderInterface
3232

3333
public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodingImpl = null)
3434
{
35-
$this->encodingImpl = null === $encodingImpl ? new JsonEncode() : $encodingImpl;
36-
$this->decodingImpl = null === $decodingImpl ? new JsonDecode(true) : $decodingImpl;
35+
$this->encodingImpl = $encodingImpl ?: new JsonEncode();
36+
$this->decodingImpl = $decodingImpl ?: new JsonDecode(true);
3737
}
3838

3939
/**

0 commit comments

Comments
 (0)