Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 186-201 (lines=16) @@
183
        return $this;
184
    }
185
186
    final protected function checkOnyExceptInArray($key, array $options = null)
187
    {
188
        if (
189
            $options
190
            &&
191
            (
192
                (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only']))
193
                ||
194
                (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except']))
195
            )
196
        ) {
197
            return false;
198
        }
199
200
        return true;
201
    }
202
203
    public function toArray(array $options = null)
204
    {

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

@@ 189-204 (lines=16) @@
186
        return $this->getOnlyStore();
187
    }
188
189
    final protected function checkOnyExceptInArray($key, array $options = null)
190
    {
191
        if (
192
            $options
193
            &&
194
            (
195
                (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only']))
196
                ||
197
                (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except']))
198
            )
199
        ) {
200
            return false;
201
        }
202
203
        return true;
204
    }
205
206
    public function toArray(array $options = null)
207
    {