Code Duplication    Length = 11-11 lines in 2 locations

src/Schema/Type.php 2 locations

@@ 256-266 (lines=11) @@
253
        return $tuple;
254
    }
255
256
    public function getTuple($input)
257
    {
258
        $output = [];
259
        foreach ($this->getProperties() as $index => $name) {
260
            if (array_key_exists($name, $input)) {
261
                $output[$index] = $this->encodeProperty($name, $input[$name]);
262
            }
263
        }
264
265
        return $output;
266
    }
267
268
    public function fromTuple($input)
269
    {
@@ 268-278 (lines=11) @@
265
        return $output;
266
    }
267
268
    public function fromTuple($input)
269
    {
270
        $output = [];
271
        foreach ($this->getProperties() as $index => $name) {
272
            if (array_key_exists($index, $input)) {
273
                $output[$name] = $this->decodeProperty($name, $input[$index]);
274
            }
275
        }
276
277
        return $output;
278
    }
279
280
    public function encodeProperty($name, $value)
281
    {