Skip to content

Commit 34dff61

Browse files
Remove some visual debt by adding type hints on final methods/classes
1 parent cc9981b commit 34dff61

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Encoder/ChainDecoder.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,9 @@ public function supportsDecoding($format, array $context = array())
5757
/**
5858
* Gets the decoder supporting the format.
5959
*
60-
* @param string $format
61-
* @param array $context
62-
*
63-
* @return DecoderInterface
64-
*
6560
* @throws RuntimeException if no decoder is found
6661
*/
67-
private function getDecoder($format, array $context)
62+
private function getDecoder(string $format, array $context): DecoderInterface
6863
{
6964
if (isset($this->decoderByFormat[$format])
7065
&& isset($this->decoders[$this->decoderByFormat[$format]])

Encoder/ChainEncoder.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,9 @@ public function needsNormalization($format, array $context = array())
8080
/**
8181
* Gets the encoder supporting the format.
8282
*
83-
* @param string $format
84-
* @param array $context
85-
*
86-
* @return EncoderInterface
87-
*
8883
* @throws RuntimeException if no encoder is found
8984
*/
90-
private function getEncoder($format, array $context)
85+
private function getEncoder(string $format, array $context): EncoderInterface
9186
{
9287
if (isset($this->encoderByFormat[$format])
9388
&& isset($this->encoders[$this->encoderByFormat[$format]])

0 commit comments

Comments
 (0)