Code Duplication    Length = 11-15 lines in 4 locations

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

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

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