Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 230-245 (lines=16) @@
227
        return $this;
228
    }
229
230
    final protected function checkOnyExceptInArray($key, array $options = null)
231
    {
232
        if (
233
            $options
234
            &&
235
            (
236
                (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only']))
237
                ||
238
                (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except']))
239
            )
240
        ) {
241
            return false;
242
        }
243
244
        return true;
245
    }
246
247
    public function toArray(array $options = null)
248
    {

src/Doctrine/ORM/Entities/BaseEntity.php 1 location

@@ 198-213 (lines=16) @@
195
        return $this->getOnlyStore();
196
    }
197
198
    final protected function checkOnyExceptInArray($key, array $options = null)
199
    {
200
        if (
201
            $options
202
            &&
203
            (
204
                (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only']))
205
                ||
206
                (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except']))
207
            )
208
        ) {
209
            return false;
210
        }
211
212
        return true;
213
    }
214
215
    public function toArray(array $options = null)
216
    {