Code Duplication    Length = 11-15 lines in 4 locations

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

@@ 149-159 (lines=11) @@
146
            )
147
        );
148
149
        if ($languageId !== false) {
150
            $query->where(
151
                $query->expr->gt(
152
                    $query->expr->bitAnd(
153
                        $this->dbHandler->quoteColumn('lang_mask'),
154
                        $query->bindValue($languageId, null, \PDO::PARAM_INT)
155
                    ),
156
                    0
157
                )
158
            );
159
        }
160
161
        $statement = $query->prepare();
162
        $statement->execute();
@@ 213-227 (lines=15) @@
210
            $limit,
211
            $offset
212
        );
213
        if (isset($languageCode)) {
214
            $query->where(
215
                $query->expr->gt(
216
                    $query->expr->bitAnd(
217
                        $this->dbHandler->quoteColumn('lang_mask'),
218
                        $query->bindValue(
219
                            $this->languageMaskGenerator->generateLanguageIndicator($languageCode, false),
220
                            null,
221
                            \PDO::PARAM_INT
222
                        )
223
                    ),
224
                    0
225
                )
226
            );
227
        }
228
        $statement = $query->prepare();
229
        $statement->execute();
230

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

@@ 1823-1833 (lines=11) @@
1820
        }
1821
1822
        // relation type
1823
        if (isset($relationType)) {
1824
            $query->where(
1825
                $query->expr->gt(
1826
                    $query->expr->bitAnd(
1827
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1828
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1829
                    ),
1830
                    0
1831
                )
1832
            );
1833
        }
1834
1835
        $statement = $query->prepare();
1836
        $statement->execute();
@@ 1880-1890 (lines=11) @@
1877
        );
1878
1879
        // relation type
1880
        if (isset($relationType)) {
1881
            $query->where(
1882
                $query->expr->gt(
1883
                    $query->expr->bitAnd(
1884
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1885
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1886
                    ),
1887
                    0
1888
                )
1889
            );
1890
        }
1891
1892
        $statement = $query->prepare();
1893