Code Duplication    Length = 11-11 lines in 2 locations

src/Schema/Type.php 2 locations

@@ 370-380 (lines=11) @@
367
        return $tuple;
368
    }
369
370
    public function getTuple($input)
371
    {
372
        $output = [];
373
        foreach ($this->getProperties() as $index => $name) {
374
            if (array_key_exists($name, $input)) {
375
                $output[$index] = $this->encodeProperty($name, $input[$name]);
376
            }
377
        }
378
379
        return $output;
380
    }
381
382
    public function fromTuple($input)
383
    {
@@ 382-392 (lines=11) @@
379
        return $output;
380
    }
381
382
    public function fromTuple($input)
383
    {
384
        $output = [];
385
        foreach ($this->getProperties() as $index => $name) {
386
            if (array_key_exists($index, $input)) {
387
                $output[$name] = $this->decodeProperty($name, $input[$index]);
388
            }
389
        }
390
391
        return $output;
392
    }
393
394
    public function encodeProperty($name, $value)
395
    {