Code Duplication    Length = 7-7 lines in 2 locations

src/Doctrine/ODM/MongoDB/Entities/BaseEntity.php 1 location

@@ 168-174 (lines=7) @@
165
        foreach ($data as $key => $value) {
166
            $set = true;
167
168
            if (
169
                ((!isset($data['id']) || !is_numeric($data['id'])) && !in_array($key, $this->getOnlyStore()))
170
                ||
171
                (isset($data['id']) && is_numeric($data['id']) && !in_array($key, $this->getOnlyUpdate()))
172
            ) {
173
                $set = false;
174
            }
175
176
            $method = 'set'.ucfirst($key);
177

src/Doctrine/Common/Traits/SetPropertiesEntityTrait.php 1 location

@@ 23-29 (lines=7) @@
20
        foreach ($data as $key => $value) {
21
            $set = true;
22
23
            if (
24
                ((!isset($data['id']) || !is_numeric($data['id'])) && !in_array($key, $this->getOnlyStore()))
25
                ||
26
                (isset($data['id']) && is_numeric($data['id']) && !in_array($key, $this->getOnlyUpdate()))
27
            ) {
28
                $set = false;
29
            }
30
31
            $methodSet = 'set'.ucfirst($key);
32
            $methodGet = 'get'.ucfirst($key);