Code Duplication    Length = 10-10 lines in 2 locations

Serializer/Bridge/Visitor/MindbazDeserializationVisitor.php 1 location

@@ 28-37 (lines=10) @@
25
     *
26
     * @return array
27
     */
28
    protected function decode($subscriber)
29
    {
30
        $fields = array_flip(SubscriberEncoder::FIELDS);
31
        $data = [];
32
        foreach ($subscriber->getFld() as $fld) {
33
            $data[$fields[$fld->getIdField()]] = $fld->getValue();
34
        }
35
36
        return $data;
37
    }
38
}
39

Serializer/SubscriberEncoder.php 1 location

@@ 75-84 (lines=10) @@
72
     *
73
     * @return array
74
     */
75
    public function decode($subscriber, $format, array $context = [])
76
    {
77
        $fields = array_flip(SubscriberEncoder::FIELDS);
78
        $data = [];
79
        foreach ($subscriber->getFld() as $fld) {
80
            $data[$fields[$fld->getIdField()]] = $fld->getValue();
81
        }
82
83
        return $data;
84
    }
85
86
    /**
87
     * {@inheritdoc}