Code Duplication    Length = 11-11 lines in 2 locations

src/plan/PlanHydrator.php 1 location

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

src/price/PriceHydrator.php 1 location

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