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

@@ 1620-1630 (lines=11) @@
1617
        }
1618
1619
        // relation type
1620
        if (isset($relationType)) {
1621
            $query->where(
1622
                $query->expr->gt(
1623
                    $query->expr->bitAnd(
1624
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1625
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1626
                    ),
1627
                    0
1628
                )
1629
            );
1630
        }
1631
1632
        $statement = $query->prepare();
1633
        $statement->execute();
@@ 1677-1687 (lines=11) @@
1674
        );
1675
1676
        // relation type
1677
        if (isset($relationType)) {
1678
            $query->where(
1679
                $query->expr->gt(
1680
                    $query->expr->bitAnd(
1681
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1682
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1683
                    ),
1684
                    0
1685
                )
1686
            );
1687
        }
1688
1689
        $statement = $query->prepare();
1690