Code Duplication    Length = 11-15 lines in 4 locations

eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php 2 locations

@@ 141-151 (lines=11) @@
138
            )
139
        );
140
141
        if ($languageId !== false) {
142
            $query->where(
143
                $query->expr->gt(
144
                    $query->expr->bitAnd(
145
                        $this->dbHandler->quoteColumn('lang_mask'),
146
                        $query->bindValue($languageId, null, \PDO::PARAM_INT)
147
                    ),
148
                    0
149
                )
150
            );
151
        }
152
153
        $statement = $query->prepare();
154
        $statement->execute();
@@ 205-219 (lines=15) @@
202
            $limit,
203
            $offset
204
        );
205
        if (isset($languageCode)) {
206
            $query->where(
207
                $query->expr->gt(
208
                    $query->expr->bitAnd(
209
                        $this->dbHandler->quoteColumn('lang_mask'),
210
                        $query->bindValue(
211
                            $this->languageMaskGenerator->generateLanguageIndicator($languageCode, false),
212
                            null,
213
                            \PDO::PARAM_INT
214
                        )
215
                    ),
216
                    0
217
                )
218
            );
219
        }
220
        $statement = $query->prepare();
221
        $statement->execute();
222

eZ/Publish/Core/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php 2 locations

@@ 1678-1688 (lines=11) @@
1675
        }
1676
1677
        // relation type
1678
        if (isset($relationType)) {
1679
            $query->where(
1680
                $query->expr->gt(
1681
                    $query->expr->bitAnd(
1682
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1683
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1684
                    ),
1685
                    0
1686
                )
1687
            );
1688
        }
1689
1690
        $statement = $query->prepare();
1691
        $statement->execute();
@@ 1735-1745 (lines=11) @@
1732
        );
1733
1734
        // relation type
1735
        if (isset($relationType)) {
1736
            $query->where(
1737
                $query->expr->gt(
1738
                    $query->expr->bitAnd(
1739
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1740
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1741
                    ),
1742
                    0
1743
                )
1744
            );
1745
        }
1746
1747
        $statement = $query->prepare();
1748