Code Duplication    Length = 10-10 lines in 2 locations

src/Schema/Type.php 2 locations

@@ 98-107 (lines=10) @@
95
        return in_array($name, $this->properties);
96
    }
97
98
    public function encode($input)
99
    {
100
        $output = [];
101
        foreach ($this->getMapping() as $index => $name) {
102
            if (array_key_exists($name, $input)) {
103
                $output[$index] = $input[$name];
104
            }
105
        }
106
        return $output;
107
    }
108
109
    public function decode($input)
110
    {
@@ 109-118 (lines=10) @@
106
        return $output;
107
    }
108
109
    public function decode($input)
110
    {
111
        $output = [];
112
        foreach ($this->getMapping() as $index => $name) {
113
            if (array_key_exists($index, $input)) {
114
                $output[$name] = $input[$index];
115
            }
116
        }
117
        return $output;
118
    }
119
}
120