Code Duplication    Length = 11-11 lines in 2 locations

src/plan/PlanHydrator.php 1 location

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

src/price/PriceHydrator.php 1 location

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