Code Duplication    Length = 11-15 lines in 4 locations

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

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

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

@@ 1672-1682 (lines=11) @@
1669
        }
1670
1671
        // relation type
1672
        if (isset($relationType)) {
1673
            $query->where(
1674
                $query->expr->gt(
1675
                    $query->expr->bitAnd(
1676
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1677
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1678
                    ),
1679
                    0
1680
                )
1681
            );
1682
        }
1683
1684
        $statement = $query->prepare();
1685
        $statement->execute();
@@ 1729-1739 (lines=11) @@
1726
        );
1727
1728
        // relation type
1729
        if (isset($relationType)) {
1730
            $query->where(
1731
                $query->expr->gt(
1732
                    $query->expr->bitAnd(
1733
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1734
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1735
                    ),
1736
                    0
1737
                )
1738
            );
1739
        }
1740
1741
        $statement = $query->prepare();
1742