Code Duplication    Length = 9-9 lines in 2 locations

src/Repository.php 2 locations

@@ 27-35 (lines=9) @@
24
    {
25
        $data = (array) $data;
26
        $class = Entity::class;
27
        foreach ($this->getMapper()->getPlugins() as $plugin) {
28
            $entityClass = $plugin->getEntityClass($this->space);
29
            if ($entityClass) {
30
                if ($class != Entity::class) {
31
                    throw new Exception('Entity class override');
32
                }
33
                $class = $entityClass;
34
            }
35
        }
36
37
        if (array_key_exists(0, $data)) {
38
            $byType = [];
@@ 155-163 (lines=9) @@
152
        }
153
154
        $class = Entity::class;
155
        foreach ($this->getMapper()->getPlugins() as $plugin) {
156
            $entityClass = $plugin->getEntityClass($this->space);
157
            if ($entityClass) {
158
                if ($class != Entity::class) {
159
                    throw new Exception('Entity class override');
160
                }
161
                $class = $entityClass;
162
            }
163
        }
164
        $instance = new $class($this);
165
166
        $this->original[$key] = $tuple;