Code Duplication    Length = 5-5 lines in 2 locations

src/ObjectHydrator.php 2 locations

@@ 85-89 (lines=5) @@
82
     */
83
    private function hydrateNode($node, Schema $schema)
84
    {
85
        if ($schema instanceof ArraySchema) {
86
            return array_map(function ($value) use ($schema) {
87
                return $this->hydrateNode($value, $schema->getItemsSchema());
88
            }, $node);
89
        }
90
        if ($schema instanceof ObjectSchema) {
91
            if (!$schema->hasComplexType()) {
92
                $object = clone $node;
@@ 138-142 (lines=5) @@
135
            /** @var ScalarSchema $schema */
136
            return $this->dateTimeSerializer->serialize($node, $schema);
137
        }
138
        if ($schema instanceof ArraySchema) {
139
            return array_map(function ($value) use ($schema) {
140
                return $this->dehydrateNode($value, $schema->getItemsSchema());
141
            }, $node);
142
        }
143
        if ($schema instanceof ObjectSchema) {
144
            if (!$node instanceof \stdClass) {
145
                $class  = get_class($node);