StubDecoder.php 355 B

12345678910111213141516171819202122
  1. <?php
  2. declare(strict_types=1);
  3. namespace JsonMachineTest\JsonDecoder;
  4. use JsonMachine\JsonDecoder\ItemDecoder;
  5. class StubDecoder implements ItemDecoder
  6. {
  7. private $decoded;
  8. public function __construct($decoded)
  9. {
  10. $this->decoded = $decoded;
  11. }
  12. public function decode($jsonValue)
  13. {
  14. return $this->decoded;
  15. }
  16. }