Code Duplication    Length = 11-11 lines in 2 locations

src/Schema/Type.php 2 locations

@@ 293-303 (lines=11) @@
290
        return $tuple;
291
    }
292
293
    public function getTuple($input)
294
    {
295
        $output = [];
296
        foreach ($this->getProperties() as $index => $name) {
297
            if (array_key_exists($name, $input)) {
298
                $output[$index] = $this->encodeProperty($name, $input[$name]);
299
            }
300
        }
301
302
        return $output;
303
    }
304
305
    public function fromTuple($input)
306
    {
@@ 305-315 (lines=11) @@
302
        return $output;
303
    }
304
305
    public function fromTuple($input)
306
    {
307
        $output = [];
308
        foreach ($this->getProperties() as $index => $name) {
309
            if (array_key_exists($index, $input)) {
310
                $output[$name] = $this->decodeProperty($name, $input[$index]);
311
            }
312
        }
313
314
        return $output;
315
    }
316
317
    public function encodeProperty($name, $value)
318
    {