Code Duplication    Length = 11-11 lines in 2 locations

src/price/PriceHydrator.php 1 location

@@ 73-83 (lines=11) @@
70
     * {@inheritdoc}
71
     * @param object|Plan $object
72
     */
73
    public function extract($object)
74
    {
75
        $result = array_filter([
76
            'id'            => $object->getId(),
77
            'name'          => $object->getName(),
78
            'parent_id'     => $object->parent->getid(),
79
            'seller_id'     => $object->seller->getid(),
80
        ]);
81
82
        return $result;
83
    }
84
85
    /**
86
     * @param string $className

src/plan/PlanHydrator.php 1 location

@@ 53-63 (lines=11) @@
50
     * {@inheritdoc}
51
     * @param object|Plan $object
52
     */
53
    public function extract($object)
54
    {
55
        $result = array_filter([
56
            'id'            => $object->getId(),
57
            'name'          => $object->getName(),
58
            'parent_id'     => $object->parent->getid(),
59
            'seller_id'     => $object->seller->getid(),
60
        ]);
61
62
        return $result;
63
    }
64
}
65