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

@@ 1667-1677 (lines=11) @@
1664
        }
1665
1666
        // relation type
1667
        if (isset($relationType)) {
1668
            $query->where(
1669
                $query->expr->gt(
1670
                    $query->expr->bitAnd(
1671
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1672
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1673
                    ),
1674
                    0
1675
                )
1676
            );
1677
        }
1678
1679
        $statement = $query->prepare();
1680
        $statement->execute();
@@ 1724-1734 (lines=11) @@
1721
        );
1722
1723
        // relation type
1724
        if (isset($relationType)) {
1725
            $query->where(
1726
                $query->expr->gt(
1727
                    $query->expr->bitAnd(
1728
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1729
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1730
                    ),
1731
                    0
1732
                )
1733
            );
1734
        }
1735
1736
        $statement = $query->prepare();
1737