Code Duplication    Length = 5-5 lines in 2 locations

plugins/Field/src/Model/Behavior/FieldableBehavior.php 1 location

@@ 182-186 (lines=5) @@
179
     */
180
    public function beforeFind(Event $event, Query $query, ArrayObject $options, $primary)
181
    {
182
        if ((isset($options['fieldable']) && $options['fieldable'] === false) ||
183
            !$this->config('enabled')
184
        ) {
185
            return true;
186
        }
187
188
        if (array_key_exists('eav', $options)) {
189
            unset($options['eav']);

plugins/Eav/src/Model/Behavior/EavBehavior.php 1 location

@@ 414-418 (lines=5) @@
411
     */
412
    public function beforeFind(Event $event, Query $query, ArrayObject $options, $primary)
413
    {
414
        if (!$this->config('enabled') ||
415
            (isset($options['eav']) && $options['eav'] === false)
416
        ) {
417
            return true;
418
        }
419
420
        $options['bundle'] = !isset($options['bundle']) ? null : $options['bundle'];
421
        $query = $this->_scopeQuery($query, $options['bundle']);