Code Duplication    Length = 8-8 lines in 2 locations

plugins/Eav/src/Model/Behavior/QueryScope/WhereScope.php 2 locations

@@ 111-118 (lines=8) @@
108
        $field = $expression->getField();
109
        $column = is_string($field) ? $this->_toolbox->columnName($field) : '';
110
111
        if (empty($column) ||
112
            in_array($column, (array)$this->_table->schema()->columns()) || // ignore real columns
113
            !in_array($column, $this->_toolbox->getAttributeNames()) ||
114
            !$this->_toolbox->isSearchable($column) // ignore no searchable virtual columns
115
        ) {
116
            // nothing to alter
117
            return $expression;
118
        }
119
120
        $attr = $this->_toolbox->attributes($bundle)[$column];
121
        $value = $expression->getValue();
@@ 187-194 (lines=8) @@
184
            $field = $value->getIdentifier();
185
            $column = is_string($field) ? $this->_toolbox->columnName($field) : '';
186
187
            if (empty($column) ||
188
                in_array($column, (array)$this->_table->schema()->columns()) || // ignore real columns
189
                !in_array($column, $this->_toolbox->getAttributeNames($bundle)) ||
190
                !$this->_toolbox->isSearchable($column) // ignore no searchable virtual columns
191
            ) {
192
                // nothing to alter
193
                return $expression;
194
            }
195
196
            $pk = $this->_tablePrimaryKey();
197
            $driverClass = $this->_driverClass($query);